LLVM  6.0.0svn
EnumTables.cpp
Go to the documentation of this file.
1 //===- EnumTables.cpp - Enum to string conversion tables ------------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
12 #include <type_traits>
13 
14 using namespace llvm;
15 using namespace codeview;
16 
17 #define CV_ENUM_CLASS_ENT(enum_class, enum) \
18  { #enum, std::underlying_type < enum_class > ::type(enum_class::enum) }
19 
20 #define CV_ENUM_ENT(ns, enum) \
21  { #enum, ns::enum }
22 
24 #define CV_SYMBOL(enum, val) {#enum, enum},
25 #include "llvm/DebugInfo/CodeView/CodeViewSymbols.def"
26 #undef CV_SYMBOL
27 };
28 
30 #define CV_TYPE(name, val) {#name, name},
31 #include "llvm/DebugInfo/CodeView/CodeViewTypes.def"
32 #undef CV_TYPE
33 };
34 
36 #define CV_REGISTER(name, val) CV_ENUM_CLASS_ENT(RegisterId, name),
37 #include "llvm/DebugInfo/CodeView/CodeViewRegisters.def"
38 #undef CV_REGISTER
39 };
40 
46 };
47 
57 };
58 
59 static const EnumEntry<uint16_t> LocalFlags[] = {
71 };
72 
78 };
79 
90 };
91 
102 };
103 
117 };
118 
124 };
125 
186 };
187 
208 };
209 
225 };
226 
234 };
235 
237  CV_ENUM_CLASS_ENT(ThunkOrdinal, Standard),
244 };
245 
249 };
250 
289 
290 namespace llvm {
291 namespace codeview {
292 
294  return makeArrayRef(SymbolTypeNames);
295 }
296 
298  return makeArrayRef(TypeLeafNames);
299 }
300 
302  return makeArrayRef(RegisterNames);
303 }
304 
306  return makeArrayRef(PublicSymFlagNames);
307 }
308 
310  return makeArrayRef(ProcSymFlagNames);
311 }
312 
314  return makeArrayRef(LocalFlags);
315 }
316 
318  return makeArrayRef(FrameCookieKinds);
319 }
320 
322  return makeArrayRef(SourceLanguages);
323 }
324 
326  return makeArrayRef(CompileSym2FlagNames);
327 }
328 
330  return makeArrayRef(CompileSym3FlagNames);
331 }
332 
334  return makeArrayRef(FileChecksumNames);
335 }
336 
338  return makeArrayRef(CPUTypeNames);
339 }
340 
342  return makeArrayRef(FrameProcSymFlagNames);
343 }
344 
346  return makeArrayRef(ExportSymFlagNames);
347 }
348 
350  return makeArrayRef(ModuleSubstreamKindNames);
351 }
352 
354  return makeArrayRef(ThunkOrdinalNames);
355 }
356 
358  return makeArrayRef(TrampolineNames);
359 }
360 
364 }
365 
366 } // end namespace codeview
367 } // end namespace llvm
const NoneType None
Definition: None.h:24
ArrayRef< EnumEntry< uint32_t > > getModuleSubstreamKindNames()
Definition: EnumTables.cpp:349
static const EnumEntry< uint16_t > TrampolineNames[]
Definition: EnumTables.cpp:246
static const EnumEntry< uint32_t > ModuleSubstreamKindNames[]
Definition: EnumTables.cpp:210
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
ArrayRef< EnumEntry< uint16_t > > getExportSymFlagNames()
Definition: EnumTables.cpp:345
ArrayRef< EnumEntry< uint32_t > > getCompileSym3FlagNames()
Definition: EnumTables.cpp:329
CompileSym3Flags
Corresponds to COMPILESYM3::Flags bitfield.
Definition: CodeView.h:451
static const EnumEntry< uint32_t > FrameProcSymFlagNames[]
Definition: EnumTables.cpp:188
Data in the the SUBSEC_FRAMEDATA subection.
Definition: CodeView.h:535
static const EnumEntry< uint8_t > ProcSymFlagNames[]
Definition: EnumTables.cpp:48
ArrayRef< EnumEntry< uint16_t > > getRegisterNames()
Definition: EnumTables.cpp:301
static const EnumEntry< uint32_t > PublicSymFlagNames[]
Definition: EnumTables.cpp:41
A class that wrap the SHA1 algorithm.
Definition: SHA1.h:29
ArrayRef< EnumEntry< TypeLeafKind > > getTypeLeafNames()
Definition: EnumTables.cpp:297
ArrayRef< EnumEntry< uint32_t > > getPublicSymFlagNames()
Definition: EnumTables.cpp:305
ArrayRef< T > makeArrayRef(const T &OneElt)
Construct an ArrayRef from a single element.
Definition: ArrayRef.h:451
ArrayRef< EnumEntry< uint8_t > > getThunkOrdinalNames()
Definition: EnumTables.cpp:353
ArrayRef< EnumEntry< uint8_t > > getFrameCookieKindNames()
Definition: EnumTables.cpp:317
#define CV_ENUM_ENT(ns, enum)
Definition: EnumTables.cpp:20
PublicSymFlags
Corresponds to the CV_PUBSYMFLAGS bitfield.
Definition: CodeView.h:411
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
Definition: APInt.h:33
ArrayRef< EnumEntry< COFF::SectionCharacteristics > > getImageSectionCharacteristicNames()
Definition: EnumTables.cpp:362
static const EnumEntry< codeview::SourceLanguage > SourceLanguages[]
Definition: EnumTables.cpp:80
static const EnumEntry< TypeLeafKind > TypeLeafNames[]
Definition: EnumTables.cpp:29
ArrayRef< EnumEntry< unsigned > > getCPUTypeNames()
Definition: EnumTables.cpp:337
static const EnumEntry< uint16_t > RegisterNames[]
Definition: EnumTables.cpp:35
static const EnumEntry< uint32_t > CompileSym2FlagNames[]
Definition: EnumTables.cpp:92
static const EnumEntry< uint8_t > FrameCookieKinds[]
Definition: EnumTables.cpp:73
static const EnumEntry< unsigned > CPUTypeNames[]
Definition: EnumTables.cpp:126
ArrayRef< EnumEntry< uint32_t > > getFileChecksumNames()
Definition: EnumTables.cpp:333
SourceLanguage
These values correspond to the CV_CFL_LANG enumeration, and are documented here: https://msdn.microsoft.com/en-us/library/bw3aekw6.aspx.
Definition: CodeView.h:144
ArrayRef< EnumEntry< uint32_t > > getFrameProcSymFlagNames()
Definition: EnumTables.cpp:341
static const EnumEntry< SymbolKind > SymbolTypeNames[]
Definition: EnumTables.cpp:23
ArrayRef< EnumEntry< SymbolKind > > getSymbolTypeNames()
Definition: EnumTables.cpp:293
The DMD compiler emits &#39;D&#39; for the CV source language.
Definition: CodeView.h:165
CPUType
These values correspond to the CV_CPU_TYPE_e enumeration, and are documented here: https://msdn...
Definition: CodeView.h:79
ArrayRef< EnumEntry< uint8_t > > getProcSymFlagNames()
Definition: EnumTables.cpp:309
ArrayRef< EnumEntry< SourceLanguage > > getSourceLanguageNames()
Definition: EnumTables.cpp:321
static const EnumEntry< uint16_t > LocalFlags[]
Definition: EnumTables.cpp:59
static const EnumEntry< uint16_t > ExportSymFlagNames[]
Definition: EnumTables.cpp:227
ArrayRef< EnumEntry< uint32_t > > getCompileSym2FlagNames()
Definition: EnumTables.cpp:325
static const EnumEntry< uint32_t > FileChecksumNames[]
Definition: EnumTables.cpp:119
static const EnumEntry< uint8_t > ThunkOrdinalNames[]
Definition: EnumTables.cpp:236
ArrayRef< EnumEntry< uint16_t > > getTrampolineNames()
Definition: EnumTables.cpp:357
#define CV_ENUM_CLASS_ENT(enum_class, enum)
Definition: EnumTables.cpp:17
static const EnumEntry< uint32_t > CompileSym3FlagNames[]
Definition: EnumTables.cpp:104
Definition: MD5.h:41
static const EnumEntry< COFF::SectionCharacteristics > ImageSectionCharacteristicNames[]
Definition: EnumTables.cpp:252
ThunkOrdinal
These values correspond to the THUNK_ORDINAL enumeration.
Definition: CodeView.h:514
ArrayRef< EnumEntry< uint16_t > > getLocalFlagNames()
Definition: EnumTables.cpp:313
ProcSymFlags
Corresponds to the CV_PROCFLAGS bitfield.
Definition: CodeView.h:421
LocalSymFlags
Corresponds to CV_LVARFLAGS bitfield.
Definition: CodeView.h:394
CompileSym2Flags
Corresponds to COMPILESYM2::Flags bitfield.
Definition: CodeView.h:435