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"
23 template <class T> class IPDBEnumChildren;
28 typedef IPDBEnumChildren<PDBSymbol> IPDBEnumSymbols;
29 typedef IPDBEnumChildren<IPDBSourceFile> IPDBEnumSourceFiles;
30 typedef IPDBEnumChildren<IPDBDataStream> IPDBEnumDataStreams;
33 class PDBSymbolCompiland;
34 class PDBSymbolCompilandDetails;
35 class PDBSymbolCompilandEnv;
39 class PDBSymbolAnnotation;
41 class PDBSymbolPublicSymbol;
42 class PDBSymbolTypeUDT;
43 class PDBSymbolTypeEnum;
44 class PDBSymbolTypeFunctionSig;
45 class PDBSymbolTypePointer;
46 class PDBSymbolTypeArray;
47 class PDBSymbolTypeBuiltin;
48 class PDBSymbolTypeTypedef;
49 class PDBSymbolTypeBaseClass;
50 class PDBSymbolTypeFriend;
51 class PDBSymbolTypeFunctionArg;
52 class PDBSymbolFuncDebugStart;
53 class PDBSymbolFuncDebugEnd;
54 class PDBSymbolUsingNamespace;
55 class PDBSymbolTypeVTableShape;
56 class PDBSymbolTypeVTable;
57 class PDBSymbolCustom;
59 class PDBSymbolTypeCustom;
60 class PDBSymbolTypeManaged;
61 class PDBSymbolTypeDimension;
62 class PDBSymbolUnknown;
64 /// Specifies which PDB reader implementation is to be used. Only a value
65 /// of PDB_ReaderType::DIA is supported.
66 enum class PDB_ReaderType {
70 /// Defines a 128-bit unique identifier. This maps to a GUID on Windows, but
71 /// is abstracted here for the purposes of non-Windows platforms that don't have
72 /// the GUID structure defined.
78 /// An enumeration indicating the type of data contained in this table.
79 enum class PDB_TableType {
89 /// Defines flags used for enumerating child symbols. This corresponds to the
90 /// NameSearchOptions enumeration which is documented here:
91 /// https://msdn.microsoft.com/en-us/library/yat28ads.aspx
92 enum PDB_NameSearchFlags {
94 NS_CaseSensitive = 0x1,
95 NS_CaseInsensitive = 0x2,
96 NS_FileNameExtMatch = 0x4,
98 NS_UndecoratedName = 0x10
101 /// Specifies the hash algorithm that a source file from a PDB was hashed with.
102 /// This corresponds to the CV_SourceChksum_t enumeration and are documented
103 /// here: https://msdn.microsoft.com/en-us/library/e96az21x.aspx
104 enum class PDB_Checksum { None = 0, MD5 = 1, SHA1 = 2 };
106 /// These values correspond to the CV_CPU_TYPE_e enumeration, and are documented
107 /// here: https://msdn.microsoft.com/en-us/library/b2fc64ek.aspx
167 D3D11_Shader = 0x100,
170 enum class PDB_Machine {
195 /// These values correspond to the CV_call_e enumeration, and are documented
196 /// at the following locations:
197 /// https://msdn.microsoft.com/en-us/library/b2fc64ek.aspx
198 /// https://msdn.microsoft.com/en-us/library/windows/desktop/ms680207(v=vs.85).aspx
200 enum class PDB_CallingConv {
225 NearVectorcall = 0x18,
229 /// These values correspond to the CV_CFL_LANG enumeration, and are documented
230 /// here: https://msdn.microsoft.com/en-us/library/bw3aekw6.aspx
231 enum class PDB_Lang {
251 /// These values correspond to the DataKind enumeration, and are documented
252 /// here: https://msdn.microsoft.com/en-us/library/b2x2t313.aspx
253 enum class PDB_DataKind {
266 /// These values correspond to the SymTagEnum enumeration, and are documented
267 /// here: https://msdn.microsoft.com/en-us/library/bkedss5f.aspx
268 enum class PDB_SymType {
303 /// These values correspond to the LocationType enumeration, and are documented
304 /// here: https://msdn.microsoft.com/en-us/library/f57kaez3.aspx
305 enum class PDB_LocType {
320 /// These values correspond to the THUNK_ORDINAL enumeration, and are documented
321 /// here: https://msdn.microsoft.com/en-us/library/dh0k8hft.aspx
322 enum class PDB_ThunkOrdinal {
332 /// These values correspond to the UdtKind enumeration, and are documented
333 /// here: https://msdn.microsoft.com/en-us/library/wcstk66t.aspx
334 enum class PDB_UdtType { Struct, Class, Union, Interface };
336 /// These values correspond to the StackFrameTypeEnum enumeration, and are
337 /// documented here: https://msdn.microsoft.com/en-us/library/bc5207xw.aspx.
338 enum class PDB_StackFrameType { FPO, KernelTrap, KernelTSS, EBP, FrameData };
340 /// These values correspond to the StackFrameTypeEnum enumeration, and are
341 /// documented here: https://msdn.microsoft.com/en-us/library/bc5207xw.aspx.
342 enum class PDB_MemoryType { Code, Data, Stack, HeapCode };
344 /// These values correspond to the Basictype enumeration, and are documented
345 /// here: https://msdn.microsoft.com/en-us/library/4szdtzc3.aspx
346 enum class PDB_BuiltinType {
367 enum class PDB_RegisterId {
419 enum class PDB_MemberAccess { Private = 1, Protected = 2, Public = 3 };
428 enum PDB_VariantType {
446 : Type(PDB_VariantType::Empty) {
449 PDB_VariantType Type;
469 template <> struct hash<llvm::PDB_SymType> {
470 typedef llvm::PDB_SymType argument_type;
471 typedef std::size_t result_type;
473 result_type operator()(const argument_type &Arg) const {
474 return std::hash<int>()(static_cast<int>(Arg));