LLVM  9.0.0svn
EnumTables.cpp
Go to the documentation of this file.
1 //===- EnumTables.cpp - Enum to string conversion tables ------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
11 #include <type_traits>
12 
13 using namespace llvm;
14 using namespace codeview;
15 
16 #define CV_ENUM_CLASS_ENT(enum_class, enum) \
17  { #enum, std::underlying_type < enum_class > ::type(enum_class::enum) }
18 
19 #define CV_ENUM_ENT(ns, enum) \
20  { #enum, ns::enum }
21 
23 #define CV_SYMBOL(enum, val) {#enum, enum},
24 #include "llvm/DebugInfo/CodeView/CodeViewSymbols.def"
25 #undef CV_SYMBOL
26 };
27 
29 #define CV_TYPE(name, val) {#name, name},
30 #include "llvm/DebugInfo/CodeView/CodeViewTypes.def"
31 #undef CV_TYPE
32 };
33 
35 #define CV_REGISTER(name, val) CV_ENUM_CLASS_ENT(RegisterId, name),
36 #include "llvm/DebugInfo/CodeView/CodeViewRegisters.def"
37 #undef CV_REGISTER
38 };
39 
45 };
46 
56 };
57 
58 static const EnumEntry<uint16_t> LocalFlags[] = {
70 };
71 
77 };
78 
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:23
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:23
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:47
ArrayRef< EnumEntry< uint16_t > > getRegisterNames()
Definition: EnumTables.cpp:303
static const EnumEntry< uint32_t > PublicSymFlagNames[]
Definition: EnumTables.cpp:40
A class that wrap the SHA1 algorithm.
Definition: SHA1.h:28
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:450
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:19
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:32
ArrayRef< EnumEntry< COFF::SectionCharacteristics > > getImageSectionCharacteristicNames()
Definition: EnumTables.cpp:364
static const EnumEntry< codeview::SourceLanguage > SourceLanguages[]
Definition: EnumTables.cpp:79
static const EnumEntry< TypeLeafKind > TypeLeafNames[]
Definition: EnumTables.cpp:28
ArrayRef< EnumEntry< unsigned > > getCPUTypeNames()
Definition: EnumTables.cpp:339
static const EnumEntry< uint16_t > RegisterNames[]
Definition: EnumTables.cpp:34
static const EnumEntry< uint32_t > CompileSym2FlagNames[]
Definition: EnumTables.cpp:92
static const EnumEntry< uint8_t > FrameCookieKinds[]
Definition: EnumTables.cpp:72
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:143
ArrayRef< EnumEntry< uint32_t > > getFrameProcSymFlagNames()
Definition: EnumTables.cpp:343
static const EnumEntry< SymbolKind > SymbolTypeNames[]
Definition: EnumTables.cpp:22
ArrayRef< EnumEntry< SymbolKind > > getSymbolTypeNames()
Definition: EnumTables.cpp:295
The DMD & Swift compilers emit &#39;D&#39; and &#39;S&#39;, respectively, for the CV source language. ...
Definition: CodeView.h:164
CPUType
These values correspond to the CV_CPU_TYPE_e enumeration, and are documented here: https://msdn...
Definition: CodeView.h:78
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:58
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:16
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