1 //===- PDBTypes.h - Defines enums for various fields contained in PDB ---*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_DEBUGINFO_PDB_PDBTYPES_H
11 #define LLVM_DEBUGINFO_PDB_PDBTYPES_H
13 #include "llvm/Config/llvm-config.h"
20 class PDBSymbolCompiland;
25 template <class T> class IPDBEnumChildren;
30 typedef IPDBEnumChildren<PDBSymbol> IPDBEnumSymbols;
31 typedef IPDBEnumChildren<IPDBSourceFile> IPDBEnumSourceFiles;
32 typedef IPDBEnumChildren<IPDBDataStream> IPDBEnumDataStreams;
35 class PDBSymbolCompiland;
36 class PDBSymbolCompilandDetails;
37 class PDBSymbolCompilandEnv;
41 class PDBSymbolAnnotation;
43 class PDBSymbolPublicSymbol;
44 class PDBSymbolTypeUDT;
45 class PDBSymbolTypeEnum;
46 class PDBSymbolTypeFunctionSig;
47 class PDBSymbolTypePointer;
48 class PDBSymbolTypeArray;
49 class PDBSymbolTypeBuiltin;
50 class PDBSymbolTypeTypedef;
51 class PDBSymbolTypeBaseClass;
52 class PDBSymbolTypeFriend;
53 class PDBSymbolTypeFunctionArg;
54 class PDBSymbolFuncDebugStart;
55 class PDBSymbolFuncDebugEnd;
56 class PDBSymbolUsingNamespace;
57 class PDBSymbolTypeVTableShape;
58 class PDBSymbolTypeVTable;
59 class PDBSymbolCustom;
61 class PDBSymbolTypeCustom;
62 class PDBSymbolTypeManaged;
63 class PDBSymbolTypeDimension;
64 class PDBSymbolUnknown;
66 /// Specifies which PDB reader implementation is to be used. Only a value
67 /// of PDB_ReaderType::DIA is supported.
68 enum class PDB_ReaderType {
72 enum class PDB_DumpLevel {
78 /// Defines a 128-bit unique identifier. This maps to a GUID on Windows, but
79 /// is abstracted here for the purposes of non-Windows platforms that don't have
80 /// the GUID structure defined.
86 /// An enumeration indicating the type of data contained in this table.
87 enum class PDB_TableType {
97 /// Defines flags used for enumerating child symbols. This corresponds to the
98 /// NameSearchOptions enumeration which is documented here:
99 /// https://msdn.microsoft.com/en-us/library/yat28ads.aspx
100 enum PDB_NameSearchFlags {
102 NS_CaseSensitive = 0x1,
103 NS_CaseInsensitive = 0x2,
104 NS_FileNameExtMatch = 0x4,
106 NS_UndecoratedName = 0x10
109 /// Specifies the hash algorithm that a source file from a PDB was hashed with.
110 /// This corresponds to the CV_SourceChksum_t enumeration and are documented
111 /// here: https://msdn.microsoft.com/en-us/library/e96az21x.aspx
112 enum class PDB_Checksum { None = 0, MD5 = 1, SHA1 = 2 };
114 /// These values correspond to the CV_CPU_TYPE_e enumeration, and are documented
115 /// here: https://msdn.microsoft.com/en-us/library/b2fc64ek.aspx
175 D3D11_Shader = 0x100,
178 enum class PDB_Machine {
203 /// These values correspond to the CV_call_e enumeration, and are documented
204 /// at the following locations:
205 /// https://msdn.microsoft.com/en-us/library/b2fc64ek.aspx
206 /// https://msdn.microsoft.com/en-us/library/windows/desktop/ms680207(v=vs.85).aspx
208 enum class PDB_CallingConv {
233 NearVectorcall = 0x18,
237 /// These values correspond to the CV_CFL_LANG enumeration, and are documented
238 /// here: https://msdn.microsoft.com/en-us/library/bw3aekw6.aspx
239 enum class PDB_Lang {
259 /// These values correspond to the DataKind enumeration, and are documented
260 /// here: https://msdn.microsoft.com/en-us/library/b2x2t313.aspx
261 enum class PDB_DataKind {
274 /// These values correspond to the SymTagEnum enumeration, and are documented
275 /// here: https://msdn.microsoft.com/en-us/library/bkedss5f.aspx
276 enum class PDB_SymType {
311 /// These values correspond to the LocationType enumeration, and are documented
312 /// here: https://msdn.microsoft.com/en-us/library/f57kaez3.aspx
313 enum class PDB_LocType {
328 /// These values correspond to the THUNK_ORDINAL enumeration, and are documented
329 /// here: https://msdn.microsoft.com/en-us/library/dh0k8hft.aspx
330 enum class PDB_ThunkOrdinal {
340 /// These values correspond to the UdtKind enumeration, and are documented
341 /// here: https://msdn.microsoft.com/en-us/library/wcstk66t.aspx
342 enum class PDB_UdtType { Struct, Class, Union, Interface };
344 /// These values correspond to the StackFrameTypeEnum enumeration, and are
345 /// documented here: https://msdn.microsoft.com/en-us/library/bc5207xw.aspx.
346 enum class PDB_StackFrameType { FPO, KernelTrap, KernelTSS, EBP, FrameData };
348 /// These values correspond to the StackFrameTypeEnum enumeration, and are
349 /// documented here: https://msdn.microsoft.com/en-us/library/bc5207xw.aspx.
350 enum class PDB_MemoryType { Code, Data, Stack, HeapCode };
352 /// These values correspond to the Basictype enumeration, and are documented
353 /// here: https://msdn.microsoft.com/en-us/library/4szdtzc3.aspx
354 enum class PDB_BuiltinType {
375 enum class PDB_RegisterId {
427 enum class PDB_MemberAccess { Private = 1, Protected = 2, Public = 3 };
436 enum PDB_VariantType {
454 : Type(PDB_VariantType::Empty) {
457 PDB_VariantType Type;
477 template <> struct hash<llvm::PDB_SymType> {
478 typedef llvm::PDB_SymType argument_type;
479 typedef std::size_t result_type;
481 result_type operator()(const argument_type &Arg) const {
482 return std::hash<int>()(static_cast<int>(Arg));