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 
89 };
90 
101 };
102 
116 };
117 
123 };
124 
185 };
186 
209 };
210 
226 };
227 
235 };
236 
238  CV_ENUM_CLASS_ENT(ThunkOrdinal, Standard),
245 };
246 
250 };
251 
290 
291 namespace llvm {
292 namespace codeview {
293 
295  return makeArrayRef(SymbolTypeNames);
296 }
297 
299  return makeArrayRef(TypeLeafNames);
300 }
301 
303  return makeArrayRef(RegisterNames);
304 }
305 
307  return makeArrayRef(PublicSymFlagNames);
308 }
309 
311  return makeArrayRef(ProcSymFlagNames);
312 }
313 
315  return makeArrayRef(LocalFlags);
316 }
317 
319  return makeArrayRef(FrameCookieKinds);
320 }
321 
323  return makeArrayRef(SourceLanguages);
324 }
325 
327  return makeArrayRef(CompileSym2FlagNames);
328 }
329 
331  return makeArrayRef(CompileSym3FlagNames);
332 }
333 
335  return makeArrayRef(FileChecksumNames);
336 }
337 
339  return makeArrayRef(CPUTypeNames);
340 }
341 
343  return makeArrayRef(FrameProcSymFlagNames);
344 }
345 
347  return makeArrayRef(ExportSymFlagNames);
348 }
349 
351  return makeArrayRef(ModuleSubstreamKindNames);
352 }
353 
355  return makeArrayRef(ThunkOrdinalNames);
356 }
357 
359  return makeArrayRef(TrampolineNames);
360 }
361 
365 }
366 
367 } // end namespace codeview
368 } // end namespace llvm
const NoneType None
Definition: None.h:23
ArrayRef< EnumEntry< uint32_t > > getModuleSubstreamKindNames()
Definition: EnumTables.cpp:350
static const EnumEntry< uint16_t > TrampolineNames[]
Definition: EnumTables.cpp:247
static const EnumEntry< uint32_t > ModuleSubstreamKindNames[]
Definition: EnumTables.cpp:211
This class represents lattice values for constants.
Definition: AllocatorList.h:23
ArrayRef< EnumEntry< uint16_t > > getExportSymFlagNames()
Definition: EnumTables.cpp:346
ArrayRef< EnumEntry< uint32_t > > getCompileSym3FlagNames()
Definition: EnumTables.cpp:330
CompileSym3Flags
Corresponds to COMPILESYM3::Flags bitfield.
Definition: CodeView.h:454
static const EnumEntry< uint32_t > FrameProcSymFlagNames[]
Definition: EnumTables.cpp:187
Data in the SUBSEC_FRAMEDATA subection.
Definition: CodeView.h:551
static const EnumEntry< uint8_t > ProcSymFlagNames[]
Definition: EnumTables.cpp:47
ArrayRef< EnumEntry< uint16_t > > getRegisterNames()
Definition: EnumTables.cpp:302
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:298
ArrayRef< EnumEntry< uint32_t > > getPublicSymFlagNames()
Definition: EnumTables.cpp:306
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:354
ArrayRef< EnumEntry< uint8_t > > getFrameCookieKindNames()
Definition: EnumTables.cpp:318
#define CV_ENUM_ENT(ns, enum)
Definition: EnumTables.cpp:19
PublicSymFlags
Corresponds to the CV_PUBSYMFLAGS bitfield.
Definition: CodeView.h:414
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:363
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:338
static const EnumEntry< uint16_t > RegisterNames[]
Definition: EnumTables.cpp:34
static const EnumEntry< uint32_t > CompileSym2FlagNames[]
Definition: EnumTables.cpp:91
static const EnumEntry< uint8_t > FrameCookieKinds[]
Definition: EnumTables.cpp:72
static const EnumEntry< unsigned > CPUTypeNames[]
Definition: EnumTables.cpp:125
ArrayRef< EnumEntry< uint32_t > > getFileChecksumNames()
Definition: EnumTables.cpp:334
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:342
static const EnumEntry< SymbolKind > SymbolTypeNames[]
Definition: EnumTables.cpp:22
ArrayRef< EnumEntry< SymbolKind > > getSymbolTypeNames()
Definition: EnumTables.cpp:294
The DMD compiler emits &#39;D&#39; 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:310
ArrayRef< EnumEntry< SourceLanguage > > getSourceLanguageNames()
Definition: EnumTables.cpp:322
static const EnumEntry< uint16_t > LocalFlags[]
Definition: EnumTables.cpp:58
static const EnumEntry< uint16_t > ExportSymFlagNames[]
Definition: EnumTables.cpp:228
ArrayRef< EnumEntry< uint32_t > > getCompileSym2FlagNames()
Definition: EnumTables.cpp:326
static const EnumEntry< uint32_t > FileChecksumNames[]
Definition: EnumTables.cpp:118
static const EnumEntry< uint8_t > ThunkOrdinalNames[]
Definition: EnumTables.cpp:237
ArrayRef< EnumEntry< uint16_t > > getTrampolineNames()
Definition: EnumTables.cpp:358
#define CV_ENUM_CLASS_ENT(enum_class, enum)
Definition: EnumTables.cpp:16
static const EnumEntry< uint32_t > CompileSym3FlagNames[]
Definition: EnumTables.cpp:103
Definition: MD5.h:41
static const EnumEntry< COFF::SectionCharacteristics > ImageSectionCharacteristicNames[]
Definition: EnumTables.cpp:253
ThunkOrdinal
These values correspond to the THUNK_ORDINAL enumeration.
Definition: CodeView.h:530
ArrayRef< EnumEntry< uint16_t > > getLocalFlagNames()
Definition: EnumTables.cpp:314
ProcSymFlags
Corresponds to the CV_PROCFLAGS bitfield.
Definition: CodeView.h:424
LocalSymFlags
Corresponds to CV_LVARFLAGS bitfield.
Definition: CodeView.h:397
CompileSym2Flags
Corresponds to COMPILESYM2::Flags bitfield.
Definition: CodeView.h:438