LLVM  8.0.1
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 
210 };
211 
227 };
228 
236 };
237 
239  CV_ENUM_CLASS_ENT(ThunkOrdinal, Standard),
246 };
247 
251 };
252 
291 
292 namespace llvm {
293 namespace codeview {
294 
296  return makeArrayRef(SymbolTypeNames);
297 }
298 
300  return makeArrayRef(TypeLeafNames);
301 }
302 
304  return makeArrayRef(RegisterNames);
305 }
306 
308  return makeArrayRef(PublicSymFlagNames);
309 }
310 
312  return makeArrayRef(ProcSymFlagNames);
313 }
314 
316  return makeArrayRef(LocalFlags);
317 }
318 
320  return makeArrayRef(FrameCookieKinds);
321 }
322 
324  return makeArrayRef(SourceLanguages);
325 }
326 
328  return makeArrayRef(CompileSym2FlagNames);
329 }
330 
332  return makeArrayRef(CompileSym3FlagNames);
333 }
334 
336  return makeArrayRef(FileChecksumNames);
337 }
338 
340  return makeArrayRef(CPUTypeNames);
341 }
342 
344  return makeArrayRef(FrameProcSymFlagNames);
345 }
346 
348  return makeArrayRef(ExportSymFlagNames);
349 }
350 
352  return makeArrayRef(ModuleSubstreamKindNames);
353 }
354 
356  return makeArrayRef(ThunkOrdinalNames);
357 }
358 
360  return makeArrayRef(TrampolineNames);
361 }
362 
366 }
367 
368 } // end namespace codeview
369 } // end namespace llvm
const NoneType None
Definition: None.h:24
ArrayRef< EnumEntry< uint32_t > > getModuleSubstreamKindNames()
Definition: EnumTables.cpp:351
static const EnumEntry< uint16_t > TrampolineNames[]
Definition: EnumTables.cpp:248
static const EnumEntry< uint32_t > ModuleSubstreamKindNames[]
Definition: EnumTables.cpp:212
This class represents lattice values for constants.
Definition: AllocatorList.h:24
ArrayRef< EnumEntry< uint16_t > > getExportSymFlagNames()
Definition: EnumTables.cpp:347
ArrayRef< EnumEntry< uint32_t > > getCompileSym3FlagNames()
Definition: EnumTables.cpp:331
CompileSym3Flags
Corresponds to COMPILESYM3::Flags bitfield.
Definition: CodeView.h:455
static const EnumEntry< uint32_t > FrameProcSymFlagNames[]
Definition: EnumTables.cpp:188
Data in the SUBSEC_FRAMEDATA subection.
Definition: CodeView.h:552
static const EnumEntry< uint8_t > ProcSymFlagNames[]
Definition: EnumTables.cpp:48
ArrayRef< EnumEntry< uint16_t > > getRegisterNames()
Definition: EnumTables.cpp:303
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:299
ArrayRef< EnumEntry< uint32_t > > getPublicSymFlagNames()
Definition: EnumTables.cpp:307
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:355
ArrayRef< EnumEntry< uint8_t > > getFrameCookieKindNames()
Definition: EnumTables.cpp:319
#define CV_ENUM_ENT(ns, enum)
Definition: EnumTables.cpp:20
PublicSymFlags
Corresponds to the CV_PUBSYMFLAGS bitfield.
Definition: CodeView.h:415
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:364
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:339
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:335
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:343
static const EnumEntry< SymbolKind > SymbolTypeNames[]
Definition: EnumTables.cpp:23
ArrayRef< EnumEntry< SymbolKind > > getSymbolTypeNames()
Definition: EnumTables.cpp:295
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:311
ArrayRef< EnumEntry< SourceLanguage > > getSourceLanguageNames()
Definition: EnumTables.cpp:323
static const EnumEntry< uint16_t > LocalFlags[]
Definition: EnumTables.cpp:59
static const EnumEntry< uint16_t > ExportSymFlagNames[]
Definition: EnumTables.cpp:229
ArrayRef< EnumEntry< uint32_t > > getCompileSym2FlagNames()
Definition: EnumTables.cpp:327
static const EnumEntry< uint32_t > FileChecksumNames[]
Definition: EnumTables.cpp:119
static const EnumEntry< uint8_t > ThunkOrdinalNames[]
Definition: EnumTables.cpp:238
ArrayRef< EnumEntry< uint16_t > > getTrampolineNames()
Definition: EnumTables.cpp:359
#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:254
ThunkOrdinal
These values correspond to the THUNK_ORDINAL enumeration.
Definition: CodeView.h:531
ArrayRef< EnumEntry< uint16_t > > getLocalFlagNames()
Definition: EnumTables.cpp:315
ProcSymFlags
Corresponds to the CV_PROCFLAGS bitfield.
Definition: CodeView.h:425
LocalSymFlags
Corresponds to CV_LVARFLAGS bitfield.
Definition: CodeView.h:398
CompileSym2Flags
Corresponds to COMPILESYM2::Flags bitfield.
Definition: CodeView.h:439