llvm.org GIT mirror llvm / 9c505a5
Revert "Create lib/DebugInfo/PDB." This reverts commit 21028, as it is causing failures in LLVMConfig. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228431 91177308-0d34-0410-b5e6-96231b3b80d8 Zachary Turner 4 years ago
53 changed file(s) with 2 addition(s) and 2822 deletion(s). Raw diff Collapse all Expand all
+0
-38
include/llvm/DebugInfo/PDB/IPDBDataStream.h less more
None //===- IPDBDataStream.h - base interface for child enumerator -*- C++ ---*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_DEBUGINFO_PDB_IPDBDATASTREAM_H
10 #define LLVM_DEBUGINFO_PDB_IPDBDATASTREAM_H
11
12 #include "llvm/ADT/SmallVector.h"
13 #include "llvm/ADT/Optional.h"
14
15 #include "PDBTypes.h"
16
17 namespace llvm {
18
19 /// IPDBDataStream defines an interface used to represent a stream consisting
20 /// of a name and a series of records whose formats depend on the particular
21 /// stream type.
22 class IPDBDataStream {
23 public:
24 typedef llvm::SmallVector RecordType;
25
26 virtual ~IPDBDataStream();
27
28 virtual uint32_t getRecordCount() const = 0;
29 virtual std::string getName() const = 0;
30 virtual llvm::Optional getItemAtIndex(uint32_t Index) const = 0;
31 virtual bool getNext(RecordType &Record) = 0;
32 virtual void reset() = 0;
33 virtual std::unique_ptr clone() const = 0;
34 };
35 }
36
37 #endif
+0
-33
include/llvm/DebugInfo/PDB/IPDBEnumChildren.h less more
None //===- IPDBEnumChildren.h - base interface for child enumerator -*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_DEBUGINFO_PDB_IPDBENUMCHILDREN_H
10 #define LLVM_DEBUGINFO_PDB_IPDBENUMCHILDREN_H
11
12 #include
13 #include "PDBTypes.h"
14
15 namespace llvm {
16
17 template class IPDBEnumChildren {
18 public:
19 typedef std::unique_ptr ChildTypePtr;
20 typedef std::unique_ptr> MyTypePtr;
21
22 virtual ~IPDBEnumChildren() {}
23
24 virtual uint32_t getChildCount() const = 0;
25 virtual ChildTypePtr getChildAtIndex(uint32_t Index) const = 0;
26 virtual ChildTypePtr getNext() = 0;
27 virtual void reset() = 0;
28 virtual MyTypePtr clone() const = 0;
29 };
30 }
31
32 #endif
+0
-36
include/llvm/DebugInfo/PDB/IPDBLineNumber.h less more
None //===- IPDBLineNumber.h - base interface for PDB line no. info ---*- C++-*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_DEBUGINFO_PDB_IPDBLINENUMBER_H
10 #define LLVM_DEBUGINFO_PDB_IPDBLINENUMBER_H
11
12 #include "PDBTypes.h"
13
14 namespace llvm {
15
16 class IPDBLineNumber {
17 public:
18 virtual ~IPDBLineNumber();
19
20 virtual uint32_t getLineNumber() const = 0;
21 virtual uint32_t getLineNumberEnd() const = 0;
22 virtual uint32_t getColumnNumber() const = 0;
23 virtual uint32_t getColumnNumberEnd() const = 0;
24 virtual uint32_t getAddressSection() const = 0;
25 virtual uint32_t getAddressOffset() const = 0;
26 virtual uint32_t getRelativeVirtualAddress() const = 0;
27 virtual uint64_t getVirtualAddress() const = 0;
28 virtual uint32_t getLength() const = 0;
29 virtual uint32_t getSourceFileId() const = 0;
30 virtual uint32_t getCompilandId() const = 0;
31 virtual bool isStatement() const = 0;
32 };
33 }
34
35 #endif
+0
-209
include/llvm/DebugInfo/PDB/IPDBRawSymbol.h less more
None //===- IPDBRawSymbol.h - base interface for PDB symbol types ----*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_DEBUGINFO_PDB_IPDBRAWSYMBOL_H
10 #define LLVM_DEBUGINFO_PDB_IPDBRAWSYMBOL_H
11
12 #include
13
14 #include "llvm/ADT/SmallVector.h"
15 #include "llvm/ADT/StringRef.h"
16 #include "llvm/Support/COFF.h"
17 #include "llvm/Support/raw_ostream.h"
18 #include "PDBTypes.h"
19
20 namespace llvm {
21
22 /// IPDBRawSymbol defines an interface used to represent an arbitrary symbol.
23 /// It exposes a monolithic interface consisting of accessors for the union of
24 /// all properties that are valid for any symbol type. This interface is then
25 /// wrapped by a concrete class which exposes only those set of methods valid
26 /// for this particular symbol type. See PDBSymbol.h for more details.
27 class IPDBRawSymbol {
28 public:
29 virtual ~IPDBRawSymbol();
30
31 virtual void dump(llvm::raw_ostream &OS) const = 0;
32
33 virtual std::unique_ptr
34 findChildren(PDB_SymType Type, StringRef Name,
35 PDB_NameSearchFlags Flags) const = 0;
36 virtual std::unique_ptr
37 findChildrenByRVA(PDB_SymType Type, StringRef Name, PDB_NameSearchFlags Flags,
38 uint32_t RVA) const = 0;
39 virtual std::unique_ptr
40 findInlineFramesByRVA(uint32_t RVA) const = 0;
41
42 virtual void getDataBytes(llvm::SmallVector &bytes) const = 0;
43 virtual PDB_MemberAccess getAccess() const = 0;
44 virtual uint32_t getAddressOffset() const = 0;
45 virtual uint32_t getAddressSection() const = 0;
46 virtual uint32_t getAge() const = 0;
47 virtual uint32_t getArrayIndexTypeId() const = 0;
48 virtual uint32_t getBackEndBuild() const = 0;
49 virtual uint32_t getBackEndMajor() const = 0;
50 virtual uint32_t getBackEndMinor() const = 0;
51 virtual uint32_t getBaseDataOffset() const = 0;
52 virtual uint32_t getBaseDataSlot() const = 0;
53 virtual uint32_t getBaseSymbolId() const = 0;
54 virtual PDB_BuiltinType getBuiltinType() const = 0;
55 virtual uint32_t getBitPosition() const = 0;
56 virtual PDB_CallingConv getCallingConvention() const = 0;
57 virtual uint32_t getClassParentId() const = 0;
58 virtual std::string getCompilerName() const = 0;
59 virtual uint32_t getCount() const = 0;
60 virtual uint32_t getCountLiveRanges() const = 0;
61 virtual uint32_t getFrontEndBuild() const = 0;
62 virtual uint32_t getFrontEndMajor() const = 0;
63 virtual uint32_t getFrontEndMinor() const = 0;
64 virtual PDB_Lang getLanguage() const = 0;
65 virtual uint32_t getLexicalParentId() const = 0;
66 virtual std::string getLibraryName() const = 0;
67 virtual uint32_t getLiveRangeStartAddressOffset() const = 0;
68 virtual uint32_t getLiveRangeStartAddressSection() const = 0;
69 virtual uint32_t getLiveRangeStartRelativeVirtualAddress() const = 0;
70 virtual uint32_t getLocalBasePointerRegisterId() const = 0;
71 virtual uint32_t getLowerBoundId() const = 0;
72 virtual uint32_t getMemorySpaceKind() const = 0;
73 virtual std::string getName() const = 0;
74 virtual uint32_t getNumberOfAcceleratorPointerTags() const = 0;
75 virtual uint32_t getNumberOfColumns() const = 0;
76 virtual uint32_t getNumberOfModifiers() const = 0;
77 virtual uint32_t getNumberOfRegisterIndices() const = 0;
78 virtual uint32_t getNumberOfRows() const = 0;
79 virtual std::string getObjectFileName() const = 0;
80 virtual uint32_t getOemId() const = 0;
81 virtual uint32_t getOemSymbolId() const = 0;
82 virtual uint32_t getOffsetInUdt() const = 0;
83 virtual PDB_Cpu getPlatform() const = 0;
84 virtual uint32_t getRank() const = 0;
85 virtual uint32_t getRegisterId() const = 0;
86 virtual uint32_t getRegisterType() const = 0;
87 virtual uint32_t getRelativeVirtualAddress() const = 0;
88 virtual uint32_t getSamplerSlot() const = 0;
89 virtual uint32_t getSignature() const = 0;
90 virtual uint32_t getSizeInUdt() const = 0;
91 virtual uint32_t getSlot() const = 0;
92 virtual std::string getSourceFileName() const = 0;
93 virtual uint32_t getStride() const = 0;
94 virtual uint32_t getSubTypeId() const = 0;
95 virtual std::string getSymbolsFileName() const = 0;
96 virtual uint32_t getSymIndexId() const = 0;
97 virtual uint32_t getTargetOffset() const = 0;
98 virtual uint32_t getTargetRelativeVirtualAddress() const = 0;
99 virtual uint64_t getTargetVirtualAddress() const = 0;
100 virtual uint32_t getTargetSection() const = 0;
101 virtual uint32_t getTextureSlot() const = 0;
102 virtual uint32_t getTimeStamp() const = 0;
103 virtual uint32_t getToken() const = 0;
104 virtual uint32_t getTypeId() const = 0;
105 virtual uint32_t getUavSlot() const = 0;
106 virtual std::string getUndecoratedName() const = 0;
107 virtual uint32_t getUnmodifiedTypeId() const = 0;
108 virtual uint32_t getUpperBoundId() const = 0;
109 virtual uint32_t getVirtualBaseDispIndex() const = 0;
110 virtual uint32_t getVirtualBaseOffset() const = 0;
111 virtual uint32_t getVirtualTableShapeId() const = 0;
112 virtual PDB_DataKind getDataKind() const = 0;
113 virtual PDB_SymType getSymTag() const = 0;
114 virtual PDB_UniqueId getGuid() const = 0;
115 virtual int32_t getOffset() const = 0;
116 virtual int32_t getThisAdjust() const = 0;
117 virtual int32_t getVirtualBasePointerOffset() const = 0;
118 virtual PDB_LocType getLocationType() const = 0;
119 virtual COFF::MachineTypes getMachineType() const = 0;
120 virtual PDB_ThunkOrdinal getThunkOrdinal() const = 0;
121 virtual uint64_t getLength() const = 0;
122 virtual uint64_t getLiveRangeLength() const = 0;
123 virtual uint64_t getVirtualAddress() const = 0;
124 virtual PDB_UdtType getUdtKind() const = 0;
125 virtual bool hasConstructor() const = 0;
126 virtual bool hasCustomCallingConvention() const = 0;
127 virtual bool hasFarReturn() const = 0;
128 virtual bool isCode() const = 0;
129 virtual bool isCompilerGenerated() const = 0;
130 virtual bool isConstType() const = 0;
131 virtual bool isEditAndContinueEnabled() const = 0;
132 virtual bool isFunction() const = 0;
133 virtual bool getAddressTaken() const = 0;
134 virtual bool getNoStackOrdering() const = 0;
135 virtual bool hasAlloca() const = 0;
136 virtual bool hasAssignmentOperator() const = 0;
137 virtual bool hasCTypes() const = 0;
138 virtual bool hasCastOperator() const = 0;
139 virtual bool hasDebugInfo() const = 0;
140 virtual bool hasEH() const = 0;
141 virtual bool hasEHa() const = 0;
142 virtual bool hasInlAsm() const = 0;
143 virtual bool hasInlineAttribute() const = 0;
144 virtual bool hasInterruptReturn() const = 0;
145 virtual bool hasLongJump() const = 0;
146 virtual bool hasManagedCode() const = 0;
147 virtual bool hasNestedTypes() const = 0;
148 virtual bool hasNoInlineAttribute() const = 0;
149 virtual bool hasNoReturnAttribute() const = 0;
150 virtual bool hasOptimizedCodeDebugInfo() const = 0;
151 virtual bool hasOverloadedOperator() const = 0;
152 virtual bool hasSEH() const = 0;
153 virtual bool hasSecurityChecks() const = 0;
154 virtual bool hasSetJump() const = 0;
155 virtual bool hasStrictGSCheck() const = 0;
156 virtual bool isAcceleratorGroupSharedLocal() const = 0;
157 virtual bool isAcceleratorPointerTagLiveRange() const = 0;
158 virtual bool isAcceleratorStubFunction() const = 0;
159 virtual bool isAggregated() const = 0;
160 virtual bool isIntroVirtualFunction() const = 0;
161 virtual bool isCVTCIL() const = 0;
162 virtual bool isConstructorVirtualBase() const = 0;
163 virtual bool isCxxReturnUdt() const = 0;
164 virtual bool isDataAligned() const = 0;
165 virtual bool isHLSLData() const = 0;
166 virtual bool isHotpatchable() const = 0;
167 virtual bool isIndirectVirtualBaseClass() const = 0;
168 virtual bool isInterfaceUdt() const = 0;
169 virtual bool isIntrinsic() const = 0;
170 virtual bool isLTCG() const = 0;
171 virtual bool isLocationControlFlowDependent() const = 0;
172 virtual bool isMSILNetmodule() const = 0;
173 virtual bool isMatrixRowMajor() const = 0;
174 virtual bool isManagedCode() const = 0;
175 virtual bool isMSILCode() const = 0;
176 virtual bool isMultipleInheritance() const = 0;
177 virtual bool isNaked() const = 0;
178 virtual bool isNested() const = 0;
179 virtual bool isOptimizedAway() const = 0;
180 virtual bool isPacked() const = 0;
181 virtual bool isPointerBasedOnSymbolValue() const = 0;
182 virtual bool isPointerToDataMember() const = 0;
183 virtual bool isPointerToMemberFunction() const = 0;
184 virtual bool isPureVirtual() const = 0;
185 virtual bool isRValueReference() const = 0;
186 virtual bool isRefUdt() const = 0;
187 virtual bool isReference() const = 0;
188 virtual bool isRestrictedType() const = 0;
189 virtual bool isReturnValue() const = 0;
190 virtual bool isSafeBuffers() const = 0;
191 virtual bool isScoped() const = 0;
192 virtual bool isSdl() const = 0;
193 virtual bool isSingleInheritance() const = 0;
194 virtual bool isSplitted() const = 0;
195 virtual bool isStatic() const = 0;
196 virtual bool hasPrivateSymbols() const = 0;
197 virtual bool isUnalignedType() const = 0;
198 virtual bool isUnreached() const = 0;
199 virtual bool isValueUdt() const = 0;
200 virtual bool isVirtual() const = 0;
201 virtual bool isVirtualBaseClass() const = 0;
202 virtual bool isVirtualInheritance() const = 0;
203 virtual bool isVolatileType() const = 0;
204 };
205
206 } // namespace llvm
207
208 #endif
+0
-37
include/llvm/DebugInfo/PDB/IPDBSession.h less more
None //===- IPDBSession.h - base interface for a PDB symbol context --*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_DEBUGINFO_PDB_IPDBSESSION_H
10 #define LLVM_DEBUGINFO_PDB_IPDBSESSION_H
11
12 #include
13
14 #include "PDBTypes.h"
15
16 namespace llvm {
17
18 class PDBSymbolExe;
19
20 /// IPDBSession defines an interface used to provide a context for querying
21 /// debug information from a debug data source (for example, a PDB).
22 class IPDBSession {
23 public:
24 virtual ~IPDBSession();
25
26 virtual uint64_t getLoadAddress() const = 0;
27 virtual void setLoadAddress(uint64_t Address) = 0;
28 virtual std::unique_ptr getGlobalScope() const = 0;
29 virtual std::unique_ptr getSymbolById() const = 0;
30 virtual std::unique_ptr getSourceFileById() const = 0;
31
32 virtual std::unique_ptr getDebugStreams() const = 0;
33 };
34 }
35
36 #endif
+0
-33
include/llvm/DebugInfo/PDB/IPDBSourceFile.h less more
None //===- IPDBSourceFile.h - base interface for a PDB source file --*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_DEBUGINFO_PDB_IPDBSOURCEFILE_H
10 #define LLVM_DEBUGINFO_PDB_IPDBSOURCEFILE_H
11
12 #include
13
14 #include "PDBTypes.h"
15
16 namespace llvm {
17
18 /// IPDBSourceFile defines an interface used to represent source files whose
19 /// information are stored in the PDB.
20 class IPDBSourceFile {
21 public:
22 virtual ~IPDBSourceFile();
23
24 virtual std::string getFileName() const = 0;
25 virtual uint32_t getUniqueId() const = 0;
26 virtual std::string getChecksum() const = 0;
27 virtual PDB_Checksum getChecksumType() const = 0;
28 virtual std::unique_ptr getCompilands() const = 0;
29 };
30 }
31
32 #endif
+0
-24
include/llvm/DebugInfo/PDB/PDB.h less more
None //===- PDB.h - base header file for creating a PDB reader -------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_DEBUGINFO_PDB_PDB_H
10 #define LLVM_DEBUGINFO_PDB_PDB_H
11
12 #include
13
14 #include "PDBTypes.h"
15
16 namespace llvm {
17 class StringRef;
18
19 std::unique_ptr createPDBReader(PDB_ReaderType Type,
20 StringRef Path);
21 }
22
23 #endif
+0
-70
include/llvm/DebugInfo/PDB/PDBSymbol.h less more
None //===- PDBSymbol.h - base class for user-facing symbol types -----*- C++-*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_DEBUGINFO_PDB_IPDBSYMBOL_H
10 #define LLVM_DEBUGINFO_PDB_IPDBSYMBOL_H
11
12 #include
13
14 #include "llvm/ADT/StringRef.h"
15 #include "llvm/Support/raw_ostream.h"
16 #include "llvm/Support/Casting.h"
17
18 #include "IPDBRawSymbol.h"
19 #include "PDBTypes.h"
20
21 #define FORWARD_SYMBOL_METHOD(MethodName) \
22 auto MethodName() const->decltype(RawSymbol->MethodName()) { \
23 return RawSymbol->MethodName(); \
24 }
25
26 namespace llvm {
27
28 class IPDBRawSymbol;
29
30 /// PDBSymbol defines the base of the inheritance hierarchy for concrete symbol
31 /// types (e.g. functions, executables, vtables, etc). All concrete symbol
32 /// types inherit from PDBSymbol and expose the exact set of methods that are
33 /// valid for that particular symbol type, as described in the Microsoft
34 /// reference "Lexical and Class Hierarchy of Symbol Types":
35 /// https://msdn.microsoft.com/en-us/library/370hs6k4.aspx
36 class PDBSymbol {
37 protected:
38 PDBSymbol(std::unique_ptr Symbol);
39
40 public:
41 static std::unique_ptr
42 create(std::unique_ptr Symbol);
43
44 virtual ~PDBSymbol();
45
46 /// Dumps the contents of a symbol a raw_ostream. By default this will just
47 /// call dump() on the underlying RawSymbol, which allows us to discover
48 /// unknown properties, but individual implementations of PDBSymbol may
49 /// override the behavior to only dump known fields.
50 virtual void dump(llvm::raw_ostream &OS) const;
51
52 PDB_SymType getSymTag() const;
53
54 std::unique_ptr
55 findChildren(PDB_SymType Type, StringRef Name,
56 PDB_NameSearchFlags Flags) const;
57 std::unique_ptr findChildrenByRVA(PDB_SymType Type,
58 StringRef Name,
59 PDB_NameSearchFlags Flags,
60 uint32_t RVA) const;
61 std::unique_ptr findInlineFramesByRVA(uint32_t RVA) const;
62
63 protected:
64 const std::unique_ptr RawSymbol;
65 };
66
67 } // namespace llvm
68
69 #endif
+0
-37
include/llvm/DebugInfo/PDB/PDBSymbolAnnotation.h less more
None //===- PDBSymbolAnnotation.h - Accessors for querying PDB annotations ---*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 #ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLANNOTATION_H
9 #define LLVM_DEBUGINFO_PDB_PDBSYMBOLANNOTATION_H
10
11 #include
12
13 #include "PDBSymbol.h"
14 #include "PDBTypes.h"
15
16 namespace llvm {
17
18 class PDBSymbolAnnotation : public PDBSymbol {
19 public:
20 PDBSymbolAnnotation(std::unique_ptr AnnotationSymbol);
21
22 FORWARD_SYMBOL_METHOD(getAddressOffset)
23 FORWARD_SYMBOL_METHOD(getAddressSection)
24 FORWARD_SYMBOL_METHOD(getDataKind)
25 FORWARD_SYMBOL_METHOD(getRelativeVirtualAddress)
26 FORWARD_SYMBOL_METHOD(getSymIndexId)
27 // FORWARD_SYMBOL_METHOD(getValue)
28 FORWARD_SYMBOL_METHOD(getVirtualAddress)
29
30 static bool classof(const PDBSymbol *S) {
31 return S->getSymTag() == PDB_SymType::Annotation;
32 }
33 };
34 }
35
36 #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLANNOTATION_H
+0
-39
include/llvm/DebugInfo/PDB/PDBSymbolBlock.h less more
None //===- PDBSymbolBlock.h - Accessors for querying PDB blocks -------------*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 #ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLBLOCK_H
9 #define LLVM_DEBUGINFO_PDB_PDBSYMBOLBLOCK_H
10
11 #include
12
13 #include "PDBSymbol.h"
14 #include "PDBTypes.h"
15
16 namespace llvm {
17
18 class PDBSymbolBlock : public PDBSymbol {
19 public:
20 PDBSymbolBlock(std::unique_ptr BlockSymbol);
21
22 FORWARD_SYMBOL_METHOD(getAddressOffset)
23 FORWARD_SYMBOL_METHOD(getAddressSection)
24 FORWARD_SYMBOL_METHOD(getLength)
25 FORWARD_SYMBOL_METHOD(getLexicalParentId)
26 FORWARD_SYMBOL_METHOD(getLocationType)
27 FORWARD_SYMBOL_METHOD(getName)
28 FORWARD_SYMBOL_METHOD(getRelativeVirtualAddress)
29 FORWARD_SYMBOL_METHOD(getSymIndexId)
30 FORWARD_SYMBOL_METHOD(getVirtualAddress)
31
32 static bool classof(const PDBSymbol *S) {
33 return S->getSymTag() == PDB_SymType::Block;
34 }
35 };
36 }
37
38 #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLBLOCK_H
+0
-36
include/llvm/DebugInfo/PDB/PDBSymbolCompiland.h less more
None //===- PDBSymbolCompiland.h - Accessors for querying PDB compilands -----*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 #ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLCOMPILAND_H
9 #define LLVM_DEBUGINFO_PDB_PDBSYMBOLCOMPILAND_H
10
11 #include
12
13 #include "PDBSymbol.h"
14 #include "PDBTypes.h"
15
16 namespace llvm {
17
18 class PDBSymbolCompiland : public PDBSymbol {
19 public:
20 PDBSymbolCompiland(std::unique_ptr CompilandSymbol);
21
22 FORWARD_SYMBOL_METHOD(isEditAndContinueEnabled)
23 FORWARD_SYMBOL_METHOD(getLexicalParentId)
24 FORWARD_SYMBOL_METHOD(getLibraryName)
25 FORWARD_SYMBOL_METHOD(getName)
26 FORWARD_SYMBOL_METHOD(getSourceFileName)
27 FORWARD_SYMBOL_METHOD(getSymIndexId)
28
29 static bool classof(const PDBSymbol *S) {
30 return S->getSymTag() == PDB_SymType::Compiland;
31 }
32 };
33 }
34
35 #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLCOMPILAND_H
+0
-50
include/llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h less more
None //===- PDBSymbolCompilandDetails.h - PDB compiland details ------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLCOMPILANDDETAILS_H
10 #define LLVM_DEBUGINFO_PDB_PDBSYMBOLCOMPILANDDETAILS_H
11
12 #include "PDBSymbol.h"
13 #include "PDBTypes.h"
14
15 namespace llvm {
16
17 class PDBSymbolCompilandDetails : public PDBSymbol {
18 public:
19 PDBSymbolCompilandDetails(std::unique_ptr DetailsSymbol);
20
21 FORWARD_SYMBOL_METHOD(getBackEndBuild)
22 FORWARD_SYMBOL_METHOD(getBackEndMajor)
23 FORWARD_SYMBOL_METHOD(getBackEndMinor)
24 FORWARD_SYMBOL_METHOD(getCompilerName)
25 FORWARD_SYMBOL_METHOD(isEditAndContinueEnabled)
26 FORWARD_SYMBOL_METHOD(getFrontEndBuild)
27 FORWARD_SYMBOL_METHOD(getFrontEndMajor)
28 FORWARD_SYMBOL_METHOD(getFrontEndMinor)
29 FORWARD_SYMBOL_METHOD(hasDebugInfo)
30 FORWARD_SYMBOL_METHOD(hasManagedCode)
31 FORWARD_SYMBOL_METHOD(hasSecurityChecks)
32 FORWARD_SYMBOL_METHOD(isCVTCIL)
33 FORWARD_SYMBOL_METHOD(isDataAligned)
34 FORWARD_SYMBOL_METHOD(isHotpatchable)
35 FORWARD_SYMBOL_METHOD(isLTCG)
36 FORWARD_SYMBOL_METHOD(isMSILNetmodule)
37 FORWARD_SYMBOL_METHOD(getLanguage)
38 FORWARD_SYMBOL_METHOD(getLexicalParentId)
39 FORWARD_SYMBOL_METHOD(getPlatform)
40 FORWARD_SYMBOL_METHOD(getSymIndexId)
41
42 static bool classof(const PDBSymbol *S) {
43 return S->getSymTag() == PDB_SymType::CompilandDetails;
44 }
45 };
46
47 }; // namespace llvm
48
49 #endif // LLVM_DEBUGINFO_PDB_PDBFUNCTION_H
+0
-34
include/llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h less more
None //===- PDBSymbolCompilandEnv.h - compiland environment variables *- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLCOMPILANDENV_H
10 #define LLVM_DEBUGINFO_PDB_PDBSYMBOLCOMPILANDENV_H
11
12 #include "PDBSymbol.h"
13 #include "PDBTypes.h"
14
15 namespace llvm {
16
17 class PDBSymbolCompilandEnv : public PDBSymbol {
18 public:
19 PDBSymbolCompilandEnv(std::unique_ptr CompilandEnvSymbol);
20
21 FORWARD_SYMBOL_METHOD(getLexicalParentId)
22 FORWARD_SYMBOL_METHOD(getName)
23 FORWARD_SYMBOL_METHOD(getSymIndexId)
24 std::string getValue() const;
25
26 static bool classof(const PDBSymbol *S) {
27 return S->getSymTag() == PDB_SymType::CompilandEnv;
28 }
29 };
30
31 }; // namespace llvm
32
33 #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLCOMPILANDENV_H
+0
-38
include/llvm/DebugInfo/PDB/PDBSymbolCustom.h less more
None //===- PDBSymbolCustom.h - compiler-specific types --------------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLCUSTOM_H
10 #define LLVM_DEBUGINFO_PDB_PDBSYMBOLCUSTOM_H
11
12 #include "llvm/ADT/SmallVector.h"
13
14 #include "PDBSymbol.h"
15 #include "PDBTypes.h"
16
17 namespace llvm {
18
19 /// PDBSymbolCustom represents symbols that are compiler-specific and do not
20 /// fit anywhere else in the lexical hierarchy.
21 /// https://msdn.microsoft.com/en-us/library/d88sf09h.aspx
22 class PDBSymbolCustom : public PDBSymbol {
23 public:
24 PDBSymbolCustom(std::unique_ptr CustomSymbol);
25
26 void getDataBytes(llvm::SmallVector &bytes);
27
28 FORWARD_SYMBOL_METHOD(getSymIndexId)
29
30 static bool classof(const PDBSymbol *S) {
31 return S->getSymTag() == PDB_SymType::Custom;
32 }
33 };
34
35 }; // namespace llvm
36
37 #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLCUSTOM_H
+0
-56
include/llvm/DebugInfo/PDB/PDBSymbolData.h less more
None //===- PDBSymbolData.h - PDB data (e.g. variable) accessors -----*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLDATA_H
10 #define LLVM_DEBUGINFO_PDB_PDBSYMBOLDATA_H
11
12 #include "PDBSymbol.h"
13 #include "PDBTypes.h"
14
15 namespace llvm {
16
17 class PDBSymbolData : public PDBSymbol {
18 public:
19 PDBSymbolData(std::unique_ptr DataSymbol);
20
21 FORWARD_SYMBOL_METHOD(getAccess)
22 FORWARD_SYMBOL_METHOD(getAddressOffset)
23 FORWARD_SYMBOL_METHOD(getAddressSection)
24 FORWARD_SYMBOL_METHOD(getAddressTaken)
25 FORWARD_SYMBOL_METHOD(getBitPosition)
26 FORWARD_SYMBOL_METHOD(getClassParentId)
27 FORWARD_SYMBOL_METHOD(isCompilerGenerated)
28 FORWARD_SYMBOL_METHOD(isConstType)
29 FORWARD_SYMBOL_METHOD(getDataKind)
30 FORWARD_SYMBOL_METHOD(isAggregated)
31 FORWARD_SYMBOL_METHOD(isSplitted)
32 FORWARD_SYMBOL_METHOD(getLength)
33 FORWARD_SYMBOL_METHOD(getLexicalParentId)
34 FORWARD_SYMBOL_METHOD(getLocationType)
35 FORWARD_SYMBOL_METHOD(getName)
36 FORWARD_SYMBOL_METHOD(getOffset)
37 FORWARD_SYMBOL_METHOD(getRegisterId)
38 FORWARD_SYMBOL_METHOD(getRelativeVirtualAddress)
39 FORWARD_SYMBOL_METHOD(getSlot)
40 FORWARD_SYMBOL_METHOD(getSymIndexId)
41 FORWARD_SYMBOL_METHOD(getToken)
42 FORWARD_SYMBOL_METHOD(getTypeId)
43 FORWARD_SYMBOL_METHOD(isUnalignedType)
44 // FORWARD_SYMBOL_METHOD(getValue)
45 FORWARD_SYMBOL_METHOD(getVirtualAddress)
46 FORWARD_SYMBOL_METHOD(isVolatileType)
47
48 static bool classof(const PDBSymbol *S) {
49 return S->getSymTag() == PDB_SymType::Data;
50 }
51 };
52
53 }; // namespace llvm
54
55 #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLDATA_H
+0
-41
include/llvm/DebugInfo/PDB/PDBSymbolExe.h less more
None //===- PDBSymbolExe.h - Accessors for querying executables in a PDB ----*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 #ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLEXE_H
9 #define LLVM_DEBUGINFO_PDB_PDBSYMBOLEXE_H
10
11 #include
12
13 #include "llvm/Support/COFF.h"
14
15 #include "PDBSymbol.h"
16 #include "PDBTypes.h"
17
18 namespace llvm {
19
20 class PDBSymbolExe : public PDBSymbol {
21 public:
22 PDBSymbolExe(std::unique_ptr ExeSymbol);
23
24 FORWARD_SYMBOL_METHOD(getAge)
25 FORWARD_SYMBOL_METHOD(getGuid)
26 FORWARD_SYMBOL_METHOD(hasCTypes)
27 FORWARD_SYMBOL_METHOD(hasPrivateSymbols)
28 FORWARD_SYMBOL_METHOD(getMachineType)
29 FORWARD_SYMBOL_METHOD(getName)
30 FORWARD_SYMBOL_METHOD(getSignature)
31 FORWARD_SYMBOL_METHOD(getSymbolsFileName)
32 FORWARD_SYMBOL_METHOD(getSymIndexId)
33
34 static bool classof(const PDBSymbol *S) {
35 return S->getSymTag() == PDB_SymType::Exe;
36 }
37 };
38 } // namespace llvm
39
40 #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLEXE_H
+0
-70
include/llvm/DebugInfo/PDB/PDBSymbolFunc.h less more
None //===- PDBSymbolFunc.h - class representing a function instance -*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLFUNC_H
10 #define LLVM_DEBUGINFO_PDB_PDBSYMBOLFUNC_H
11
12 #include "PDBSymbol.h"
13 #include "PDBTypes.h"
14
15 namespace llvm {
16
17 class PDBSymbolFunc : public PDBSymbol {
18 public:
19 PDBSymbolFunc(std::unique_ptr FuncSymbol);
20
21 FORWARD_SYMBOL_METHOD(getAccess)
22 FORWARD_SYMBOL_METHOD(getAddressOffset)
23 FORWARD_SYMBOL_METHOD(getAddressSection)
24 FORWARD_SYMBOL_METHOD(getClassParentId)
25 FORWARD_SYMBOL_METHOD(isConstType)
26 FORWARD_SYMBOL_METHOD(hasCustomCallingConvention)
27 FORWARD_SYMBOL_METHOD(hasFarReturn)
28 FORWARD_SYMBOL_METHOD(hasAlloca)
29 FORWARD_SYMBOL_METHOD(hasEH)
30 FORWARD_SYMBOL_METHOD(hasEHa)
31 FORWARD_SYMBOL_METHOD(hasInlAsm)
32 FORWARD_SYMBOL_METHOD(hasLongJump)
33 FORWARD_SYMBOL_METHOD(hasSEH)
34 FORWARD_SYMBOL_METHOD(hasSecurityChecks)
35 FORWARD_SYMBOL_METHOD(hasSetJump)
36 FORWARD_SYMBOL_METHOD(hasInterruptReturn)
37 FORWARD_SYMBOL_METHOD(isIntroVirtualFunction)
38 FORWARD_SYMBOL_METHOD(hasInlineAttribute)
39 FORWARD_SYMBOL_METHOD(isNaked)
40 FORWARD_SYMBOL_METHOD(isStatic)
41 FORWARD_SYMBOL_METHOD(getLength)
42 FORWARD_SYMBOL_METHOD(getLexicalParentId)
43 FORWARD_SYMBOL_METHOD(getLocationType)
44 FORWARD_SYMBOL_METHOD(getName)
45 FORWARD_SYMBOL_METHOD(hasNoInlineAttribute)
46 FORWARD_SYMBOL_METHOD(hasNoReturnAttribute)
47 FORWARD_SYMBOL_METHOD(isUnreached)
48 FORWARD_SYMBOL_METHOD(getNoStackOrdering)
49 FORWARD_SYMBOL_METHOD(hasOptimizedCodeDebugInfo)
50 FORWARD_SYMBOL_METHOD(isPureVirtual)
51 FORWARD_SYMBOL_METHOD(getRelativeVirtualAddress)
52 FORWARD_SYMBOL_METHOD(getSymIndexId)
53 FORWARD_SYMBOL_METHOD(getToken)
54 FORWARD_SYMBOL_METHOD(getTypeId)
55 FORWARD_SYMBOL_METHOD(isUnalignedType)
56 FORWARD_SYMBOL_METHOD(getUndecoratedName)
57 FORWARD_SYMBOL_METHOD(isVirtual)
58 FORWARD_SYMBOL_METHOD(getVirtualAddress)
59 FORWARD_SYMBOL_METHOD(getVirtualBaseOffset)
60 FORWARD_SYMBOL_METHOD(isVolatileType)
61
62 static bool classof(const PDBSymbol *S) {
63 return S->getSymTag() == PDB_SymType::Function;
64 }
65 };
66
67 } // namespace llvm
68
69 #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLFUNC_H
+0
-46
include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h less more
None //===- PDBSymbolFuncDebugEnd.h - function end bounds info -------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLFUNCDEBUGEND_H
10 #define LLVM_DEBUGINFO_PDB_PDBSYMBOLFUNCDEBUGEND_H
11
12 #include "PDBSymbol.h"
13 #include "PDBTypes.h"
14
15 namespace llvm {
16
17 class PDBSymbolFuncDebugEnd : public PDBSymbol {
18 public:
19 PDBSymbolFuncDebugEnd(std::unique_ptr FuncDebugEndSymbol);
20
21 FORWARD_SYMBOL_METHOD(getAddressOffset)
22 FORWARD_SYMBOL_METHOD(getAddressSection)
23 FORWARD_SYMBOL_METHOD(hasCustomCallingConvention)
24 FORWARD_SYMBOL_METHOD(hasFarReturn)
25 FORWARD_SYMBOL_METHOD(hasInterruptReturn)
26 FORWARD_SYMBOL_METHOD(isStatic)
27 FORWARD_SYMBOL_METHOD(getLexicalParentId)
28 FORWARD_SYMBOL_METHOD(getLocationType)
29 FORWARD_SYMBOL_METHOD(hasNoInlineAttribute)
30 FORWARD_SYMBOL_METHOD(hasNoReturnAttribute)
31 FORWARD_SYMBOL_METHOD(isUnreached)
32 FORWARD_SYMBOL_METHOD(getOffset)
33 FORWARD_SYMBOL_METHOD(hasOptimizedCodeDebugInfo)
34 FORWARD_SYMBOL_METHOD(getRelativeVirtualAddress)
35 FORWARD_SYMBOL_METHOD(getSymIndexId)
36 FORWARD_SYMBOL_METHOD(getVirtualAddress)
37
38 static bool classof(const PDBSymbol *S) {
39 return S->getSymTag() == PDB_SymType::FuncDebugEnd;
40 }
41 };
42
43 } // namespace llvm
44
45 #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLFUNCDEBUGEND_H
+0
-46
include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h less more
None //===- PDBSymbolFuncDebugStart.h - function start bounds info ---*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLFUNCDEBUGSTART_H
10 #define LLVM_DEBUGINFO_PDB_PDBSYMBOLFUNCDEBUGSTART_H
11
12 #include "PDBSymbol.h"
13 #include "PDBTypes.h"
14
15 namespace llvm {
16
17 class PDBSymbolFuncDebugStart : public PDBSymbol {
18 public:
19 PDBSymbolFuncDebugStart(std::unique_ptr FuncDebugStartSymbol);
20
21 FORWARD_SYMBOL_METHOD(getAddressOffset)
22 FORWARD_SYMBOL_METHOD(getAddressSection)
23 FORWARD_SYMBOL_METHOD(hasCustomCallingConvention)
24 FORWARD_SYMBOL_METHOD(hasFarReturn)
25 FORWARD_SYMBOL_METHOD(hasInterruptReturn)
26 FORWARD_SYMBOL_METHOD(isStatic)
27 FORWARD_SYMBOL_METHOD(getLexicalParentId)
28 FORWARD_SYMBOL_METHOD(getLocationType)
29 FORWARD_SYMBOL_METHOD(hasNoInlineAttribute)
30 FORWARD_SYMBOL_METHOD(hasNoReturnAttribute)
31 FORWARD_SYMBOL_METHOD(isUnreached)
32 FORWARD_SYMBOL_METHOD(getOffset)
33 FORWARD_SYMBOL_METHOD(hasOptimizedCodeDebugInfo)
34 FORWARD_SYMBOL_METHOD(getRelativeVirtualAddress)
35 FORWARD_SYMBOL_METHOD(getSymIndexId)
36 FORWARD_SYMBOL_METHOD(getVirtualAddress)
37
38 static bool classof(const PDBSymbol *S) {
39 return S->getSymTag() == PDB_SymType::FuncDebugStart;
40 }
41 };
42
43 } // namespace llvm
44
45 #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLFUNCDEBUGSTART_H
+0
-46
include/llvm/DebugInfo/PDB/PDBSymbolLabel.h less more
None //===- PDBSymbolLabel.h - label info ----------------------------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLLABEL_H
10 #define LLVM_DEBUGINFO_PDB_PDBSYMBOLLABEL_H
11
12 #include "PDBSymbol.h"
13 #include "PDBTypes.h"
14
15 namespace llvm {
16
17 class PDBSymbolLabel : public PDBSymbol {
18 public:
19 PDBSymbolLabel(std::unique_ptr LabelSymbol);
20
21 FORWARD_SYMBOL_METHOD(getAddressOffset)
22 FORWARD_SYMBOL_METHOD(getAddressSection)
23 FORWARD_SYMBOL_METHOD(hasCustomCallingConvention)
24 FORWARD_SYMBOL_METHOD(hasFarReturn)
25 FORWARD_SYMBOL_METHOD(hasInterruptReturn)
26 FORWARD_SYMBOL_METHOD(getLexicalParentId)
27 FORWARD_SYMBOL_METHOD(getLocationType)
28 FORWARD_SYMBOL_METHOD(getName)
29 FORWARD_SYMBOL_METHOD(hasNoInlineAttribute)
30 FORWARD_SYMBOL_METHOD(hasNoReturnAttribute)
31 FORWARD_SYMBOL_METHOD(isUnreached)
32 FORWARD_SYMBOL_METHOD(getOffset)
33 FORWARD_SYMBOL_METHOD(hasOptimizedCodeDebugInfo)
34 FORWARD_SYMBOL_METHOD(getRelativeVirtualAddress)
35 FORWARD_SYMBOL_METHOD(getSymIndexId)
36 FORWARD_SYMBOL_METHOD(getVirtualAddress)
37
38 static bool classof(const PDBSymbol *S) {
39 return S->getSymTag() == PDB_SymType::Label;
40 }
41 };
42
43 } // namespace llvm
44
45 #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLLABEL_H
+0
-44
include/llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h less more
None //===- PDBSymbolPublicSymbol.h - public symbol info -------------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLPUBLICSYMBOL_H
10 #define LLVM_DEBUGINFO_PDB_PDBSYMBOLPUBLICSYMBOL_H
11
12 #include "PDBSymbol.h"
13 #include "PDBTypes.h"
14
15 namespace llvm {
16
17 class PDBSymbolPublicSymbol : public PDBSymbol {
18 public:
19 PDBSymbolPublicSymbol(std::unique_ptr PublicSymbol);
20
21 FORWARD_SYMBOL_METHOD(getAddressOffset)
22 FORWARD_SYMBOL_METHOD(getAddressSection)
23 FORWARD_SYMBOL_METHOD(isCode)
24 FORWARD_SYMBOL_METHOD(isFunction)
25 FORWARD_SYMBOL_METHOD(getLength)
26 FORWARD_SYMBOL_METHOD(getLexicalParentId)
27 FORWARD_SYMBOL_METHOD(getLocationType)
28 FORWARD_SYMBOL_METHOD(isManagedCode)
29 FORWARD_SYMBOL_METHOD(isMSILCode)
30 FORWARD_SYMBOL_METHOD(getName)
31 FORWARD_SYMBOL_METHOD(getSymIndexId)
32 FORWARD_SYMBOL_METHOD(getRelativeVirtualAddress)
33 FORWARD_SYMBOL_METHOD(getVirtualAddress)
34 FORWARD_SYMBOL_METHOD(getUndecoratedName)
35
36 static bool classof(const PDBSymbol *S) {
37 return S->getSymTag() == PDB_SymType::PublicSymbol;
38 }
39 };
40
41 } // namespace llvm
42
43 #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLPUBLICSYMBOL_H
+0
-54
include/llvm/DebugInfo/PDB/PDBSymbolThunk.h less more
None //===- PDBSymbolThunk.h - Support for querying PDB thunks ---------------*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 #ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLTHUNK_H
9 #define LLVM_DEBUGINFO_PDB_PDBSYMBOLTHUNK_H
10
11 #include
12
13 #include "PDBSymbol.h"
14 #include "PDBTypes.h"
15
16 namespace llvm {
17
18 class PDBSymbolThunk : public PDBSymbol {
19 public:
20 PDBSymbolThunk(std::unique_ptr ThunkSymbol);
21
22 FORWARD_SYMBOL_METHOD(getAccess)
23 FORWARD_SYMBOL_METHOD(getAddressOffset)
24 FORWARD_SYMBOL_METHOD(getAddressSection)
25 FORWARD_SYMBOL_METHOD(getClassParentId)
26 FORWARD_SYMBOL_METHOD(isConstType)
27 FORWARD_SYMBOL_METHOD(isIntroVirtualFunction)
28 FORWARD_SYMBOL_METHOD(isStatic)
29 FORWARD_SYMBOL_METHOD(getLength)
30 FORWARD_SYMBOL_METHOD(getLexicalParentId)
31 FORWARD_SYMBOL_METHOD(getName)
32 FORWARD_SYMBOL_METHOD(isPureVirtual)
33 FORWARD_SYMBOL_METHOD(getRelativeVirtualAddress)
34 FORWARD_SYMBOL_METHOD(getSymIndexId)
35 FORWARD_SYMBOL_METHOD(getTargetOffset)
36 FORWARD_SYMBOL_METHOD(getTargetRelativeVirtualAddress)
37 FORWARD_SYMBOL_METHOD(getTargetVirtualAddress)
38 FORWARD_SYMBOL_METHOD(getTargetSection)
39 FORWARD_SYMBOL_METHOD(getThunkOrdinal)
40 FORWARD_SYMBOL_METHOD(getTypeId)
41 FORWARD_SYMBOL_METHOD(isUnalignedType)
42 FORWARD_SYMBOL_METHOD(isVirtual)
43 FORWARD_SYMBOL_METHOD(getVirtualAddress)
44 FORWARD_SYMBOL_METHOD(getVirtualBaseOffset)
45 FORWARD_SYMBOL_METHOD(isVolatileType)
46
47 static bool classof(const PDBSymbol *S) {
48 return S->getSymTag() == PDB_SymType::Thunk;
49 }
50 };
51 } // namespace llvm
52
53 #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTHUNK_H
+0
-40
include/llvm/DebugInfo/PDB/PDBSymbolTypeArray.h less more
None //===- PDBSymbolTypeArray.h - array type information ------------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEARRAY_H
10 #define LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEARRAY_H
11
12 #include "PDBSymbol.h"
13 #include "PDBTypes.h"
14
15 namespace llvm {
16
17 class PDBSymbolTypeArray : public PDBSymbol {
18 public:
19 PDBSymbolTypeArray(std::unique_ptr ArrayTypeSymbol);
20
21 FORWARD_SYMBOL_METHOD(getArrayIndexTypeId)
22 FORWARD_SYMBOL_METHOD(isConstType)
23 FORWARD_SYMBOL_METHOD(getCount)
24 FORWARD_SYMBOL_METHOD(getLength)
25 FORWARD_SYMBOL_METHOD(getLexicalParentId)
26 FORWARD_SYMBOL_METHOD(getRank)
27 FORWARD_SYMBOL_METHOD(getSymIndexId)
28 FORWARD_SYMBOL_METHOD(getTypeId)
29 FORWARD_SYMBOL_METHOD(isUnalignedType)
30 FORWARD_SYMBOL_METHOD(isVolatileType)
31
32 static bool classof(const PDBSymbol *S) {
33 return S->getSymTag() == PDB_SymType::ArrayType;
34 }
35 };
36
37 } // namespace llvm
38
39 #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEARRAY_H
+0
-57
include/llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h less more
None //===- PDBSymbolTypeBaseClass.h - base class type information ---*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEBASECLASS_H
10 #define LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEBASECLASS_H
11
12 #include "PDBSymbol.h"
13 #include "PDBTypes.h"
14
15 namespace llvm {
16
17 class PDBSymbolTypeBaseClass : public PDBSymbol {
18 public:
19 PDBSymbolTypeBaseClass(std::unique_ptr BaseClassTypeSymbol);
20
21 FORWARD_SYMBOL_METHOD(getAccess)
22 FORWARD_SYMBOL_METHOD(getClassParentId)
23 FORWARD_SYMBOL_METHOD(hasConstructor)
24 FORWARD_SYMBOL_METHOD(isConstType)
25 FORWARD_SYMBOL_METHOD(hasAssignmentOperator)
26 FORWARD_SYMBOL_METHOD(hasCastOperator)
27 FORWARD_SYMBOL_METHOD(hasNestedTypes)
28 FORWARD_SYMBOL_METHOD(isIndirectVirtualBaseClass)
29 FORWARD_SYMBOL_METHOD(getLength)
30 FORWARD_SYMBOL_METHOD(getLexicalParentId)
31 FORWARD_SYMBOL_METHOD(getName)
32 FORWARD_SYMBOL_METHOD(isNested)
33 FORWARD_SYMBOL_METHOD(getOffset)
34 FORWARD_SYMBOL_METHOD(hasOverloadedOperator)
35 FORWARD_SYMBOL_METHOD(isPacked)
36 FORWARD_SYMBOL_METHOD(isScoped)
37 FORWARD_SYMBOL_METHOD(getSymIndexId)
38 FORWARD_SYMBOL_METHOD(getTypeId)
39 FORWARD_SYMBOL_METHOD(getUdtKind)
40 FORWARD_SYMBOL_METHOD(isUnalignedType)
41
42 FORWARD_SYMBOL_METHOD(isVirtualBaseClass)
43 FORWARD_SYMBOL_METHOD(getVirtualBaseDispIndex)
44 FORWARD_SYMBOL_METHOD(getVirtualBasePointerOffset)
45 // FORWARD_SYMBOL_METHOD(getVirtualBaseTableType)
46 FORWARD_SYMBOL_METHOD(getVirtualTableShapeId)
47 FORWARD_SYMBOL_METHOD(isVolatileType)
48
49 static bool classof(const PDBSymbol *S) {
50 return S->getSymTag() == PDB_SymType::BaseClass;
51 }
52 };
53
54 } // namespace llvm
55
56 #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEBASECLASS_H
+0
-37
include/llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h less more
None //===- PDBSymbolTypeBuiltin.h - builtin type information --------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEBUILTIN_H
10 #define LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEBUILTIN_H
11
12 #include "PDBSymbol.h"
13 #include "PDBTypes.h"
14
15 namespace llvm {
16
17 class PDBSymbolTypeBuiltin : public PDBSymbol {
18 public:
19 PDBSymbolTypeBuiltin(std::unique_ptr BuiltinTypeSymbol);
20
21 FORWARD_SYMBOL_METHOD(getBuiltinType)
22 FORWARD_SYMBOL_METHOD(isConstType)
23 FORWARD_SYMBOL_METHOD(getLength)
24 FORWARD_SYMBOL_METHOD(getLexicalParentId)
25 FORWARD_SYMBOL_METHOD(getSymIndexId)
26 FORWARD_SYMBOL_METHOD(isUnalignedType)
27 FORWARD_SYMBOL_METHOD(isVolatileType)
28
29 static bool classof(const PDBSymbol *S) {
30 return S->getSymTag() == PDB_SymType::BuiltinType;
31 }
32 };
33
34 } // namespace llvm
35
36 #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEBUILTIN_H
+0
-33
include/llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h less more
None //===- PDBSymbolTypeCustom.h - custom compiler type information -*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPECUSTOM_H
10 #define LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPECUSTOM_H
11
12 #include "PDBSymbol.h"
13 #include "PDBTypes.h"
14
15 namespace llvm {
16
17 class PDBSymbolTypeCustom : public PDBSymbol {
18 public:
19 PDBSymbolTypeCustom(std::unique_ptr CustomTypeSymbol);
20
21 FORWARD_SYMBOL_METHOD(getOemId)
22 FORWARD_SYMBOL_METHOD(getOemSymbolId)
23 FORWARD_SYMBOL_METHOD(getSymIndexId)
24
25 static bool classof(const PDBSymbol *S) {
26 return S->getSymTag() == PDB_SymType::CustomType;
27 }
28 };
29
30 } // namespace llvm
31
32 #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPECUSTOM_H
+0
-33
include/llvm/DebugInfo/PDB/PDBSymbolTypeDimension.h less more
None //===- PDBSymbolTypeDimension.h - array dimension type info -----*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEDIMENSION_H
10 #define LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEDIMENSION_H
11
12 #include "PDBSymbol.h"
13 #include "PDBTypes.h"
14
15 namespace llvm {
16
17 class PDBSymbolTypeDimension : public PDBSymbol {
18 public:
19 PDBSymbolTypeDimension(std::unique_ptr DimensionTypeSymbol);
20
21 FORWARD_SYMBOL_METHOD(getLowerBoundId)
22 FORWARD_SYMBOL_METHOD(getUpperBoundId)
23 FORWARD_SYMBOL_METHOD(getSymIndexId)
24
25 static bool classof(const PDBSymbol *S) {
26 return S->getSymTag() == PDB_SymType::Dimension;
27 }
28 };
29
30 } // namespace llvm
31
32 #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEDIMENSION_H
+0
-48
include/llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h less more
None //===- PDBSymbolTypeEnum.h - enum type info ---------------------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEENUM_H
10 #define LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEENUM_H
11
12 #include "PDBSymbol.h"
13 #include "PDBTypes.h"
14
15 namespace llvm {
16
17 class PDBSymbolTypeEnum : public PDBSymbol {
18 public:
19 PDBSymbolTypeEnum(std::unique_ptr EnumTypeSymbol);
20
21 FORWARD_SYMBOL_METHOD(getBuiltinType)
22 FORWARD_SYMBOL_METHOD(getClassParentId)
23 FORWARD_SYMBOL_METHOD(hasConstructor)
24 FORWARD_SYMBOL_METHOD(isConstType)
25 FORWARD_SYMBOL_METHOD(hasAssignmentOperator)
26 FORWARD_SYMBOL_METHOD(hasCastOperator)
27 FORWARD_SYMBOL_METHOD(hasNestedTypes)
28 FORWARD_SYMBOL_METHOD(getLength)
29 FORWARD_SYMBOL_METHOD(getLexicalParentId)
30 FORWARD_SYMBOL_METHOD(getName)
31 FORWARD_SYMBOL_METHOD(isNested)
32 FORWARD_SYMBOL_METHOD(hasOverloadedOperator)
33 FORWARD_SYMBOL_METHOD(isPacked)
34 FORWARD_SYMBOL_METHOD(isScoped)
35 FORWARD_SYMBOL_METHOD(getSymIndexId)
36 FORWARD_SYMBOL_METHOD(getTypeId)
37 FORWARD_SYMBOL_METHOD(isUnalignedType)
38 FORWARD_SYMBOL_METHOD(isVolatileType)
39
40 static bool classof(const PDBSymbol *S) {
41 return S->getSymTag() == PDB_SymType::Enum;
42 }
43 };
44
45 } // namespace llvm
46
47 #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEENUM_H
+0
-34
include/llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h less more
None //===- PDBSymbolTypeFriend.h - friend type info -----------------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEFRIEND_H
10 #define LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEFRIEND_H
11
12 #include "PDBSymbol.h"
13 #include "PDBTypes.h"
14
15 namespace llvm {
16
17 class PDBSymbolTypeFriend : public PDBSymbol {
18 public:
19 PDBSymbolTypeFriend(std::unique_ptr FriendTypeSymbol);
20
21 FORWARD_SYMBOL_METHOD(getClassParentId)
22 FORWARD_SYMBOL_METHOD(getName)
23 FORWARD_SYMBOL_METHOD(getSymIndexId)
24 FORWARD_SYMBOL_METHOD(getTypeId)
25
26 static bool classof(const PDBSymbol *S) {
27 return S->getSymTag() == PDB_SymType::Friend;
28 }
29 };
30
31 } // namespace llvm
32
33 #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEFRIEND_H
+0
-34
include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h less more
None //===- PDBSymbolTypeFunctionArg.h - function arg type info ------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEFUNCTIONARG_H
10 #define LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEFUNCTIONARG_H
11
12 #include "PDBSymbol.h"
13 #include "PDBTypes.h"
14
15 namespace llvm {
16
17 class PDBSymbolTypeFunctionArg : public PDBSymbol {
18 public:
19 PDBSymbolTypeFunctionArg(std::unique_ptr FuncArgTypeSymbol);
20
21 FORWARD_SYMBOL_METHOD(getClassParentId)
22 FORWARD_SYMBOL_METHOD(getLexicalParentId)
23 FORWARD_SYMBOL_METHOD(getSymIndexId)
24 FORWARD_SYMBOL_METHOD(getTypeId)
25
26 static bool classof(const PDBSymbol *S) {
27 return S->getSymTag() == PDB_SymType::FunctionArg;
28 }
29 };
30
31 } // namespace llvm
32
33 #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEFUNCTIONARG_H
+0
-41
include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h less more
None //===- PDBSymbolTypeFunctionSig.h - function signature type info *- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEFUNCTIONSIG_H
10 #define LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEFUNCTIONSIG_H
11
12 #include "PDBSymbol.h"
13 #include "PDBTypes.h"
14
15 namespace llvm {
16
17 class PDBSymbolTypeFunctionSig : public PDBSymbol {
18 public:
19 PDBSymbolTypeFunctionSig(std::unique_ptr FuncSigTypeSymbol);
20
21 FORWARD_SYMBOL_METHOD(getCallingConvention)
22 FORWARD_SYMBOL_METHOD(getClassParentId)
23 FORWARD_SYMBOL_METHOD(isConstType)
24 FORWARD_SYMBOL_METHOD(getCount)
25 FORWARD_SYMBOL_METHOD(getLexicalParentId)
26 // FORWARD_SYMBOL_METHOD(getObjectPointerType)
27 FORWARD_SYMBOL_METHOD(getSymIndexId)
28 FORWARD_SYMBOL_METHOD(getThisAdjust)
29 FORWARD_SYMBOL_METHOD(getTypeId)
30 FORWARD_SYMBOL_METHOD(isUnalignedType)
31 FORWARD_SYMBOL_METHOD(isVolatileType)
32
33 static bool classof(const PDBSymbol *S) {
34 return S->getSymTag() == PDB_SymType::FunctionSig;
35 }
36 };
37
38 } // namespace llvm
39
40 #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEFUNCTIONSIG_H
+0
-32
include/llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h less more
None //===- PDBSymbolTypeManaged.h - managed type info ---------------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEMANAGED_H
10 #define LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEMANAGED_H
11
12 #include "PDBSymbol.h"
13 #include "PDBTypes.h"
14
15 namespace llvm {
16
17 class PDBSymbolTypeManaged : public PDBSymbol {
18 public:
19 PDBSymbolTypeManaged(std::unique_ptr ManagedTypeSymbol);
20
21 FORWARD_SYMBOL_METHOD(getName)
22 FORWARD_SYMBOL_METHOD(getSymIndexId)
23
24 static bool classof(const PDBSymbol *S) {
25 return S->getSymTag() == PDB_SymType::ManagedType;
26 }
27 };
28
29 } // namespace llvm
30
31 #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEMANAGED_H
+0
-38
include/llvm/DebugInfo/PDB/PDBSymbolTypePointer.h less more
None //===- PDBSymbolTypePointer.h - pointer type info ---------------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEPOINTER_H
10 #define LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEPOINTER_H
11
12 #include "PDBSymbol.h"
13 #include "PDBTypes.h"
14
15 namespace llvm {
16
17 class PDBSymbolTypePointer : public PDBSymbol {
18 public:
19 PDBSymbolTypePointer(std::unique_ptr PointerTypeSymbol);
20
21 FORWARD_SYMBOL_METHOD(isConstType)
22 FORWARD_SYMBOL_METHOD(getLength)
23 FORWARD_SYMBOL_METHOD(getLexicalParentId)
24 FORWARD_SYMBOL_METHOD(isReference)
25 FORWARD_SYMBOL_METHOD(getSymIndexId)
26 FORWARD_SYMBOL_METHOD(getTypeId)
27 FORWARD_SYMBOL_METHOD(isUnalignedType)
28 FORWARD_SYMBOL_METHOD(isVolatileType)
29
30 static bool classof(const PDBSymbol *S) {
31 return S->getSymTag() == PDB_SymType::PointerType;
32 }
33 };
34
35 } // namespace llvm
36
37 #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEPOINTER_H
+0
-51
include/llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h less more
None //===- PDBSymbolTypeTypedef.h - typedef type info ---------------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPETYPEDEF_H
10 #define LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPETYPEDEF_H
11
12 #include "PDBSymbol.h"
13 #include "PDBTypes.h"
14
15 namespace llvm {
16
17 class PDBSymbolTypeTypedef : public PDBSymbol {
18 public:
19 PDBSymbolTypeTypedef(std::unique_ptr TypedefSymbol);
20
21 FORWARD_SYMBOL_METHOD(getBuiltinType)
22 FORWARD_SYMBOL_METHOD(getClassParentId)
23 FORWARD_SYMBOL_METHOD(hasConstructor)
24 FORWARD_SYMBOL_METHOD(isConstType)
25 FORWARD_SYMBOL_METHOD(hasAssignmentOperator)
26 FORWARD_SYMBOL_METHOD(hasCastOperator)
27 FORWARD_SYMBOL_METHOD(hasNestedTypes)
28 FORWARD_SYMBOL_METHOD(getLength)
29 FORWARD_SYMBOL_METHOD(getLexicalParentId)
30 FORWARD_SYMBOL_METHOD(getName)
31 FORWARD_SYMBOL_METHOD(isNested)
32 FORWARD_SYMBOL_METHOD(hasOverloadedOperator)
33 FORWARD_SYMBOL_METHOD(isPacked)
34 FORWARD_SYMBOL_METHOD(isReference)
35 FORWARD_SYMBOL_METHOD(isScoped)
36 FORWARD_SYMBOL_METHOD(getSymIndexId)
37 FORWARD_SYMBOL_METHOD(getTypeId)
38 FORWARD_SYMBOL_METHOD(getUdtKind)
39 FORWARD_SYMBOL_METHOD(isUnalignedType)
40 FORWARD_SYMBOL_METHOD(getVirtualTableShapeId)
41 FORWARD_SYMBOL_METHOD(isVolatileType)
42
43 static bool classof(const PDBSymbol *S) {
44 return S->getSymTag() == PDB_SymType::Typedef;
45 }
46 };
47
48 } // namespace llvm
49
50 #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPETYPEDEF_H
+0
-48
include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h less more
None //===- PDBSymbolTypeUDT.h - UDT type info -----------------------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEUDT_H
10 #define LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEUDT_H
11
12 #include "PDBSymbol.h"
13 #include "PDBTypes.h"
14
15 namespace llvm {
16
17 class PDBSymbolTypeUDT : public PDBSymbol {
18 public:
19 PDBSymbolTypeUDT(std::unique_ptr UDTSymbol);
20
21 FORWARD_SYMBOL_METHOD(getClassParentId)
22 FORWARD_SYMBOL_METHOD(hasConstructor)
23 FORWARD_SYMBOL_METHOD(isConstType)
24 FORWARD_SYMBOL_METHOD(hasAssignmentOperator)
25 FORWARD_SYMBOL_METHOD(hasCastOperator)
26 FORWARD_SYMBOL_METHOD(hasNestedTypes)
27 FORWARD_SYMBOL_METHOD(getLength)
28 FORWARD_SYMBOL_METHOD(getLexicalParentId)
29 FORWARD_SYMBOL_METHOD(getName)
30 FORWARD_SYMBOL_METHOD(isNested)
31 FORWARD_SYMBOL_METHOD(hasOverloadedOperator)
32 FORWARD_SYMBOL_METHOD(isPacked)
33 FORWARD_SYMBOL_METHOD(isScoped)
34 FORWARD_SYMBOL_METHOD(getSymIndexId)
35 FORWARD_SYMBOL_METHOD(getUdtKind)
36 FORWARD_SYMBOL_METHOD(isUnalignedType)
37 FORWARD_SYMBOL_METHOD(getVirtualTableShapeId)
38 FORWARD_SYMBOL_METHOD(isVolatileType)
39
40 static bool classof(const PDBSymbol *S) {
41 return S->getSymTag() == PDB_SymType::UDT;
42 }
43 };
44
45 } // namespace llvm
46
47 #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEUDT_H
+0
-37
include/llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h less more
None //===- PDBSymbolTypeVTable.h - VTable type info -----------------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEVTABLE_H
10 #define LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEVTABLE_H
11
12 #include "PDBSymbol.h"
13 #include "PDBTypes.h"
14
15 namespace llvm {
16
17 class PDBSymbolTypeVTable : public PDBSymbol {
18 public:
19 PDBSymbolTypeVTable(std::unique_ptr VtblSymbol);
20
21 FORWARD_SYMBOL_METHOD(getClassParentId)
22 FORWARD_SYMBOL_METHOD(isConstType)
23 FORWARD_SYMBOL_METHOD(getLexicalParentId)
24 FORWARD_SYMBOL_METHOD(getSymIndexId)
25 FORWARD_SYMBOL_METHOD(getTypeId)
26 FORWARD_SYMBOL_METHOD(isUnalignedType)
27 FORWARD_SYMBOL_METHOD(isVolatileType)
28
29 static bool classof(const PDBSymbol *S) {
30 return S->getSymTag() == PDB_SymType::VTable;
31 }
32 };
33
34 } // namespace llvm
35
36 #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEVTABLE_H
+0
-36
include/llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h less more
None //===- PDBSymbolTypeVTableShape.h - VTable shape info -----------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEVTABLESHAPE_H
10 #define LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEVTABLESHAPE_H
11
12 #include "PDBSymbol.h"
13 #include "PDBTypes.h"
14
15 namespace llvm {
16
17 class PDBSymbolTypeVTableShape : public PDBSymbol {
18 public:
19 PDBSymbolTypeVTableShape(std::unique_ptr VtblShapeSymbol);
20
21 FORWARD_SYMBOL_METHOD(isConstType)
22 FORWARD_SYMBOL_METHOD(getCount)
23 FORWARD_SYMBOL_METHOD(getLexicalParentId)
24 FORWARD_SYMBOL_METHOD(getSymIndexId)
25 FORWARD_SYMBOL_METHOD(isUnalignedType)
26 FORWARD_SYMBOL_METHOD(isVolatileType)
27
28 static bool classof(const PDBSymbol *S) {
29 return S->getSymTag() == PDB_SymType::VTableShape;
30 }
31 };
32
33 } // namespace llvm
34
35 #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEVTABLESHAPE_H
+0
-30
include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h less more
None //===- PDBSymbolUnknown.h - unknown symbol type -----------------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLUNKNOWN_H
10 #define LLVM_DEBUGINFO_PDB_PDBSYMBOLUNKNOWN_H
11
12 #include "PDBSymbol.h"
13 #include "PDBTypes.h"
14
15 namespace llvm {
16
17 class PDBSymbolUnknown : public PDBSymbol {
18 public:
19 PDBSymbolUnknown(std::unique_ptr UnknownSymbol);
20
21 static bool classof(const PDBSymbol *S) {
22 return (S->getSymTag() == PDB_SymType::None ||
23 S->getSymTag() >= PDB_SymType::Max);
24 }
25 };
26
27 } // namespace llvm
28
29 #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLUNKNOWN_H
+0
-33
include/llvm/DebugInfo/PDB/PDBSymbolUsingNamespace.h less more
None //===- PDBSymbolUsingNamespace.h - using namespace info ---------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLUSINGNAMESPACE_H
10 #define LLVM_DEBUGINFO_PDB_PDBSYMBOLUSINGNAMESPACE_H
11
12 #include "PDBSymbol.h"
13 #include "PDBTypes.h"
14
15 namespace llvm {
16
17 class PDBSymbolUsingNamespace : public PDBSymbol {
18 public:
19 PDBSymbolUsingNamespace(std::unique_ptr UsingSymbol);
20
21 FORWARD_SYMBOL_METHOD(getLexicalParentId)
22 FORWARD_SYMBOL_METHOD(getName)
23 FORWARD_SYMBOL_METHOD(getSymIndexId)
24
25 static bool classof(const PDBSymbol *S) {
26 return S->getSymTag() == PDB_SymType::UsingNamespace;
27 }
28 };
29
30 } // namespace llvm
31
32 #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLUSINGNAMESPACE_H
+0
-350
include/llvm/DebugInfo/PDB/PDBTypes.h less more
None //===- PDBTypes.h - Defines enums for various fields contained in PDB ---*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_DEBUGINFO_PDB_PDBTYPES_H
10 #define LLVM_DEBUGINFO_PDB_PDBTYPES_H
11
12 #include
13
14 namespace llvm {
15
16 class PDBSymbol;
17 class PDBSymbolCompiland;
18 class PDBSymbolFunc;
19 class PDBSymbolExe;
20
21 class IPDBDataStream;
22 template class IPDBEnumChildren;
23 class IPDBRawSymbol;
24 class IPDBSession;
25 class IPDBSourceFile;
26
27 typedef IPDBEnumChildren IPDBEnumSymbols;
28 typedef IPDBEnumChildren IPDBEnumSourceFiles;
29 typedef IPDBEnumChildren IPDBEnumDataStreams;
30 typedef IPDBEnumChildren IPDBEnumCompilands;
31
32 class PDBSymbolExe;
33 class PDBSymbolCompiland;
34 class PDBSymbolCompilandDetails;
35 class PDBSymbolCompilandEnv;
36 class PDBSymbolFunc;
37 class PDBSymbolBlock;
38 class PDBSymbolData;
39 class PDBSymbolAnnotation;
40 class PDBSymbolLabel;
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;
58 class PDBSymbolThunk;
59 class PDBSymbolTypeCustom;
60 class PDBSymbolTypeManaged;
61 class PDBSymbolTypeDimension;
62 class PDBSymbolUnknown;
63
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 {
67 SystemDefault = 0,
68 #if defined(_MSC_VER)
69 DIA = 1,
70 #endif
71 };
72
73 /// Defines a 128-bit unique identifier. This maps to a GUID on Windows, but
74 /// is abstracted here for the purposes of non-Windows platforms that don't have
75 /// the GUID structure defined.
76 struct PDB_UniqueId {
77 uint64_t HighPart;
78 uint64_t LowPart;
79 };
80
81 /// An enumeration indicating the type of data contained in this table.
82 enum class PDB_TableType {
83 Symbols,
84 SourceFiles,
85 LineNumbers,
86 SectionContribs,
87 Segments,
88 InjectedSources,
89 FrameData
90 };
91
92 /// Defines flags used for enumerating child symbols. This corresponds to the
93 /// NameSearchOptions enumeration which is documented here:
94 /// https://msdn.microsoft.com/en-us/library/yat28ads.aspx
95 enum PDB_NameSearchFlags {
96 NS_Default = 0x0,
97 NS_CaseSensitive = 0x1,
98 NS_CaseInsensitive = 0x2,
99 NS_FileNameExtMatch = 0x4,
100 NS_Regex = 0x8,
101 NS_UndecoratedName = 0x10
102 };
103
104 /// Specifies the hash algorithm that a source file from a PDB was hashed with.
105 /// This corresponds to the CV_SourceChksum_t enumeration and are documented
106 /// here: https://msdn.microsoft.com/en-us/library/e96az21x.aspx
107 enum class PDB_Checksum { None = 0, MD5 = 1, SHA1 = 2 };
108
109 /// These values correspond to the CV_CPU_TYPE_e enumeration, and are documented
110 /// here: https://msdn.microsoft.com/en-us/library/b2fc64ek.aspx
111 enum class PDB_Cpu {
112 Intel8080 = 0x0,
113 Intel8086 = 0x1,
114 Intel80286 = 0x2,
115 Intel80386 = 0x3,
116 Intel80486 = 0x4,
117 Pentium = 0x5,
118 PentiumPro = 0x6,
119 Pentium3 = 0x7,
120 MIPS = 0x10,
121 MIPS16 = 0x11,
122 MIPS32 = 0x12,
123 MIPS64 = 0x13,
124 MIPSI = 0x14,
125 MIPSII = 0x15,
126 MIPSIII = 0x16,
127 MIPSIV = 0x17,
128 MIPSV = 0x18,
129 M68000 = 0x20,
130 M68010 = 0x21,
131 M68020 = 0x22,
132 M68030 = 0x23,
133 M68040 = 0x24,
134 Alpha = 0x30,
135 Alpha21164 = 0x31,
136 Alpha21164A = 0x32,
137 Alpha21264 = 0x33,
138 Alpha21364 = 0x34,
139 PPC601 = 0x40,
140 PPC603 = 0x41,
141 PPC604 = 0x42,
142 PPC620 = 0x43,
143 PPCFP = 0x44,
144 PPCBE = 0x45,
145 SH3 = 0x50,
146 SH3E = 0x51,
147 SH3DSP = 0x52,
148 SH4 = 0x53,
149 SHMedia = 0x54,
150 ARM3 = 0x60,
151 ARM4 = 0x61,
152 ARM4T = 0x62,
153 ARM5 = 0x63,
154 ARM5T = 0x64,
155 ARM6 = 0x65,
156 ARM_XMAC = 0x66,
157 ARM_WMMX = 0x67,
158 ARM7 = 0x68,
159 Omni = 0x70,
160 Ia64 = 0x80,
161 Ia64_2 = 0x81,
162 CEE = 0x90,
163 AM33 = 0xa0,
164 M32R = 0xb0,
165 TriCore = 0xc0,
166 X64 = 0xd0,
167 EBC = 0xe0,
168 Thumb = 0xf0,
169 ARMNT = 0xf4,
170 D3D11_Shader = 0x100,
171 };
172
173 /// These values correspond to the CV_call_e enumeration, and are documented
174 /// at the following locations:
175 /// https://msdn.microsoft.com/en-us/library/b2fc64ek.aspx
176 /// https://msdn.microsoft.com/en-us/library/windows/desktop/ms680207(v=vs.85).aspx
177 ///
178 enum class PDB_CallingConv {
179 NearCdecl = 0x00,
180 FarCdecl = 0x01,
181 NearPascal = 0x02,
182 FarPascal = 0x03,
183 NearFastcall = 0x04,
184 FarFastcall = 0x05,
185 Skipped = 0x06,
186 NearStdcall = 0x07,
187 FarStdcall = 0x08,
188 NearSyscall = 0x09,
189 FarSyscall = 0x0a,
190 Thiscall = 0x0b,
191 MipsCall = 0x0c,
192 Generic = 0x0d,
193 Alphacall = 0x0e,
194 Ppccall = 0x0f,
195 SuperHCall = 0x10,
196 Armcall = 0x11,
197 AM33call = 0x12,
198 Tricall = 0x13,
199 Sh5call = 0x14,
200 M32R = 0x15,
201 Clrcall = 0x16,
202 Inline = 0x17,
203 NearVectorcall = 0x18,
204 Reserved = 0x19,
205 };
206
207 /// These values correspond to the CV_CFL_LANG enumeration, and are documented
208 /// here: https://msdn.microsoft.com/en-us/library/bw3aekw6.aspx
209 enum class PDB_Lang {
210 C = 0x00,
211 Cpp = 0x01,
212 Fortran = 0x02,
213 Masm = 0x03,
214 Pascal = 0x04,
215 Basic = 0x05,
216 Cobol = 0x06,
217 Link = 0x07,
218 Cvtres = 0x08,
219 Cvtpgd = 0x09,
220 CSharp = 0x0a,
221 VB = 0x0b,
222 ILAsm = 0x0c,
223 Java = 0x0d,
224 JScript = 0x0e,
225 MSIL = 0x0f,
226 HLSL = 0x10
227 };
228
229 /// These values correspond to the DataKind enumeration, and are documented
230 /// here: https://msdn.microsoft.com/en-us/library/b2x2t313.aspx
231 enum class PDB_DataKind {
232 Unknown,
233 Local,
234 StaticLocal,
235 Param,
236 ObjectPtr,
237 FileStatic,
238 Global,
239 Member,
240 StaticMember,
241 Constant
242 };
243
244 /// These values correspond to the SymTagEnum enumeration, and are documented
245 /// here: https://msdn.microsoft.com/en-us/library/bkedss5f.aspx
246 enum class PDB_SymType {
247 None,
248 Exe,
249 Compiland,
250 CompilandDetails,
251 CompilandEnv,
252 Function,
253 Block,
254 Data,
255 Annotation,
256 Label,
257 PublicSymbol,
258 UDT,
259 Enum,
260 FunctionSig,
261 PointerType,
262 ArrayType,
263 BuiltinType,
264 Typedef,
265 BaseClass,
266 Friend,
267 FunctionArg,
268 FuncDebugStart,
269 FuncDebugEnd,
270 UsingNamespace,
271 VTableShape,
272 VTable,
273 Custom,
274 Thunk,
275 CustomType,
276 ManagedType,
277 Dimension,
278 Max
279 };
280
281 /// These values correspond to the LocationType enumeration, and are documented
282 /// here: https://msdn.microsoft.com/en-us/library/f57kaez3.aspx
283 enum class PDB_LocType {
284 Null,
285 Static,
286 TLS,
287 RegRel,
288 ThisRel,
289 Enregistered,
290 BitField,
291 Slot,
292 IlRel,
293 MetaData,
294 Constant,
295 Max
296 };
297
298 /// These values correspond to the THUNK_ORDINAL enumeration, and are documented
299 /// here: https://msdn.microsoft.com/en-us/library/dh0k8hft.aspx
300 enum class PDB_ThunkOrdinal {
301 Standard,
302 ThisAdjustor,
303 Vcall,
304 Pcode,
305 UnknownLoad,
306 TrampIncremental,
307 BranchIsland
308 };
309
310 /// These values correspond to the UdtKind enumeration, and are documented
311 /// here: https://msdn.microsoft.com/en-us/library/wcstk66t.aspx
312 enum class PDB_UdtType { Struct, Class, Union, Interface };
313
314 /// These values correspond to the StackFrameTypeEnum enumeration, and are
315 /// documented here: https://msdn.microsoft.com/en-us/library/bc5207xw.aspx.
316 enum class PDB_StackFrameType { FPO, KernelTrap, KernelTSS, EBP, FrameData };
317
318 /// These values correspond to the StackFrameTypeEnum enumeration, and are
319 /// documented here: https://msdn.microsoft.com/en-us/library/bc5207xw.aspx.
320 enum class PDB_MemoryType { Code, Data, Stack, HeapCode };
321
322 /// These values correspond to the Basictype enumeration, and are documented
323 /// here: https://msdn.microsoft.com/en-us/library/4szdtzc3.aspx
324 enum class PDB_BuiltinType {
325 None = 0,
326 Void = 1,
327 Char = 2,
328 WCharT = 3,
329 Int = 6,
330 UInt = 7,
331 Float = 8,
332 BCD = 9,
333 Bool = 10,
334 Long = 13,
335 ULong = 14,
336 Currency = 25,
337 Date = 26,
338 Variant = 27,
339 Complex = 28,
340 Bitfield = 29,
341 BSTR = 30,
342 HResult = 31
343 };
344
345 enum class PDB_MemberAccess { Private = 1, Protected = 2, Public = 3 };
346
347 } // namespace llvm
348
349 #endif
0
1 add_subdirectory(DWARF)
2 if (MSVC)
3 add_subdirectory(PDB)
4 endif()
1 add_subdirectory(DWARF)
1515 ;===------------------------------------------------------------------------===;
1616
1717 [common]
18 subdirectories = DWARF PDB
18 subdirectories = DWARF
1919
2020 [component_0]
2121 type = Group
+0
-7
lib/DebugInfo/PDB/CMakeLists.txt less more
None add_llvm_library(LLVMDebugInfoPDB
1 PDB.cpp
2 PDBInterfaceAnchors.cpp
3 PDBSymbol.cpp
4 PDBSymbolCompilandEnv.cpp
5 PDBSymbolCustom.cpp
6 )
+0
-23
lib/DebugInfo/PDB/LLVMBuild.txt less more
None ;===- ./lib/DebugInfo/PDB/LLVMBuild.txt ------------------------*- Conf -*--===;
1 ;
2 ; The LLVM Compiler Infrastructure
3 ;
4 ; This file is distributed under the University of Illinois Open Source
5 ; License. See LICENSE.TXT for details.
6 ;
7 ;===------------------------------------------------------------------------===;
8 ;
9 ; This is an LLVMBuild description file for the components in this subdirectory.
10 ;
11 ; For more information on the LLVMBuild system, please see:
12 ;
13 ; http://llvm.org/docs/LLVMBuild.html
14 ;
15 ;===------------------------------------------------------------------------===;
16
17 [component_0]
18 type = Library
19 name = DebugInfoPDB
20 parent = DebugInfo
21 required_libraries = Support
22
+0
-21
lib/DebugInfo/PDB/PDB.cpp less more
None //===- PDB.cpp - base header file for creating a PDB reader -----*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #include "llvm/ADT/StringRef.h"
10
11 #include "llvm/DebugInfo/PDB/PDB.h"
12 #include "llvm/DebugInfo/PDB/IPDBSession.h"
13
14 using namespace llvm;
15
16 std::unique_ptr llvm::createPDBReader(PDB_ReaderType Type,
17 StringRef Path) {
18 // Create the correct concrete instance type based on the value of Type.
19 return nullptr;
20 }
+0
-101
lib/DebugInfo/PDB/PDBInterfaceAnchors.cpp less more
None //===- PDBInterfaceAnchors.h - defines class anchor funcions ----*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 // Class anchors are necessary per the LLVM Coding style guide, to ensure that
9 // the vtable is only generated in this object file, and not in every object
10 // file that incldues the corresponding header.
11 //===----------------------------------------------------------------------===//
12
13 #include "llvm/DebugInfo/PDB/IPDBDataStream.h"
14 #include "llvm/DebugInfo/PDB/IPDBLineNumber.h"
15 #include "llvm/DebugInfo/PDB/IPDBSession.h"
16 #include "llvm/DebugInfo/PDB/IPDBSourceFile.h"
17 #include "llvm/DebugInfo/PDB/IPDBRawSymbol.h"
18
19 #include "llvm/DebugInfo/PDB/PDBSymbolAnnotation.h"
20 #include "llvm/DebugInfo/PDB/PDBSymbolBlock.h"
21 #include "llvm/DebugInfo/PDB/PDBSymbolCompiland.h"
22 #include "llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h"
23 #include "llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h"
24 #include "llvm/DebugInfo/PDB/PDBSymbolCustom.h"
25 #include "llvm/DebugInfo/PDB/PDBSymbolData.h"
26 #include "llvm/DebugInfo/PDB/PDBSymbolExe.h"
27 #include "llvm/DebugInfo/PDB/PDBSymbolFunc.h"
28 #include "llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h"
29 #include "llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h"
30 #include "llvm/DebugInfo/PDB/PDBSymbolLabel.h"
31 #include "llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h"
32 #include "llvm/DebugInfo/PDB/PDBSymbolThunk.h"
33 #include "llvm/DebugInfo/PDB/PDBSymbolTypeArray.h"
34 #include "llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h"
35 #include "llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h"
36 #include "llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h"
37 #include "llvm/DebugInfo/PDB/PDBSymbolTypeDimension.h"
38 #include "llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h"
39 #include "llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h"
40 #include "llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h"
41 #include "llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h"
42 #include "llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h"
43 #include "llvm/DebugInfo/PDB/PDBSymbolTypePointer.h"
44 #include "llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h"
45 #include "llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h"
46 #include "llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h"
47 #include "llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h"
48 #include "llvm/DebugInfo/PDB/PDBSymbolUnknown.h"
49 #include "llvm/DebugInfo/PDB/PDBSymbolUsingNamespace.h"
50
51 using namespace llvm;
52
53 IPDBSession::~IPDBSession() {}
54
55 IPDBDataStream::~IPDBDataStream() {}
56
57 IPDBRawSymbol::~IPDBRawSymbol() {}
58
59 IPDBSourceFile::~IPDBSourceFile() {}
60
61 IPDBLineNumber::~IPDBLineNumber() {}
62
63 // All of the concrete symbol types have their methods declared inline through
64 // the use of a forwarding macro, so the constructor should be declared out of
65 // line to get the vtable in this file.
66 #define FORWARD_SYMBOL_CONSTRUCTOR(ClassName) \
67 ClassName::ClassName(std::unique_ptr Symbol) \
68 : PDBSymbol(std::move(Symbol)) {}
69
70 FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolAnnotation)
71 FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolBlock)
72 FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolCompiland)
73 FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolCompilandDetails)
74 FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolCompilandEnv)
75 FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolCustom)
76 FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolData)
77 FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolExe)
78 FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolFunc)
79 FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolFuncDebugEnd)
80 FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolFuncDebugStart)
81 FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolLabel)
82 FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolPublicSymbol)
83 FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolThunk)
84 FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolTypeArray)
85 FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolTypeBaseClass)
86 FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolTypeBuiltin)
87 FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolTypeCustom)
88 FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolTypeDimension)
89 FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolTypeEnum)
90 FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolTypeFriend)
91 FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolTypeFunctionArg)
92 FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolTypeFunctionSig)
93 FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolTypeManaged)
94 FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolTypePointer)
95 FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolTypeTypedef)
96 FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolTypeUDT)
97 FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolTypeVTable)
98 FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolTypeVTableShape)
99 FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolUnknown)
100 FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolUsingNamespace)
+0
-117
lib/DebugInfo/PDB/PDBSymbol.cpp less more
None //===- PDBSymbol.cpp - base class for user-facing symbol types --*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #include
10 #include
11
12 #include "llvm/DebugInfo/PDB/IPDBEnumChildren.h"
13 #include "llvm/DebugInfo/PDB/IPDBRawSymbol.h"
14 #include "llvm/DebugInfo/PDB/PDBSymbol.h"
15
16 #include "llvm/DebugInfo/PDB/PDBSymbolAnnotation.h"
17 #include "llvm/DebugInfo/PDB/PDBSymbolBlock.h"
18 #include "llvm/DebugInfo/PDB/PDBSymbolCompiland.h"
19 #include "llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h"
20 #include "llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h"
21 #include "llvm/DebugInfo/PDB/PDBSymbolCustom.h"
22 #include "llvm/DebugInfo/PDB/PDBSymbolData.h"
23 #include "llvm/DebugInfo/PDB/PDBSymbolExe.h"
24 #include "llvm/DebugInfo/PDB/PDBSymbolFunc.h"
25 #include "llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h"
26 #include "llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h"
27 #include "llvm/DebugInfo/PDB/PDBSymbolLabel.h"
28 #include "llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h"
29 #include "llvm/DebugInfo/PDB/PDBSymbolThunk.h"
30 #include "llvm/DebugInfo/PDB/PDBSymbolTypeArray.h"
31 #include "llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h"
32 #include "llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h"
33 #include "llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h"
34 #include "llvm/DebugInfo/PDB/PDBSymbolTypeDimension.h"
35 #include "llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h"
36 #include "llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h"
37 #include "llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h"
38 #include "llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h"
39 #include "llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h"
40 #include "llvm/DebugInfo/PDB/PDBSymbolTypePointer.h"
41 #include "llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h"
42 #include "llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h"
43 #include "llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h"
44 #include "llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h"
45 #include "llvm/DebugInfo/PDB/PDBSymbolUnknown.h"
46 #include "llvm/DebugInfo/PDB/PDBSymbolUsingNamespace.h"
47
48 using namespace llvm;
49
50 PDBSymbol::PDBSymbol(std::unique_ptr Symbol)
51 : RawSymbol(std::move(Symbol)) {}
52
53 PDBSymbol::~PDBSymbol() {}
54
55 #define FACTORY_SYMTAG_CASE(Tag, Type) \
56 case PDB_SymType::Tag: \
57 return std::unique_ptr(new Type(std::move(Symbol)));
58
59 std::unique_ptr
60 PDBSymbol::create(std::unique_ptr Symbol) {
61 switch (Symbol->getSymTag()) {
62 FACTORY_SYMTAG_CASE(Exe, PDBSymbolExe)
63 FACTORY_SYMTAG_CASE(Compiland, PDBSymbolCompiland)
64 FACTORY_SYMTAG_CASE(CompilandDetails, PDBSymbolCompilandDetails)
65 FACTORY_SYMTAG_CASE(CompilandEnv, PDBSymbolCompilandEnv)
66 FACTORY_SYMTAG_CASE(Function, PDBSymbolFunc)
67 FACTORY_SYMTAG_CASE(Block, PDBSymbolBlock)
68 FACTORY_SYMTAG_CASE(Data, PDBSymbolData)
69 FACTORY_SYMTAG_CASE(Annotation, PDBSymbolAnnotation)
70 FACTORY_SYMTAG_CASE(Label, PDBSymbolLabel)
71 FACTORY_SYMTAG_CASE(PublicSymbol, PDBSymbolPublicSymbol)
72 FACTORY_SYMTAG_CASE(UDT, PDBSymbolTypeUDT)
73 FACTORY_SYMTAG_CASE(Enum, PDBSymbolTypeEnum)
74 FACTORY_SYMTAG_CASE(FunctionSig, PDBSymbolTypeFunctionSig)
75 FACTORY_SYMTAG_CASE(PointerType, PDBSymbolTypePointer)
76 FACTORY_SYMTAG_CASE(ArrayType, PDBSymbolTypeArray)
77 FACTORY_SYMTAG_CASE(BuiltinType, PDBSymbolTypeBuiltin)
78 FACTORY_SYMTAG_CASE(Typedef, PDBSymbolTypeTypedef)
79 FACTORY_SYMTAG_CASE(BaseClass, PDBSymbolTypeBaseClass)
80 FACTORY_SYMTAG_CASE(Friend, PDBSymbolTypeFriend)
81 FACTORY_SYMTAG_CASE(FunctionArg, PDBSymbolTypeFunctionArg)
82 FACTORY_SYMTAG_CASE(FuncDebugStart, PDBSymbolFuncDebugStart)
83 FACTORY_SYMTAG_CASE(FuncDebugEnd, PDBSymbolFuncDebugEnd)
84 FACTORY_SYMTAG_CASE(UsingNamespace, PDBSymbolUsingNamespace)
85 FACTORY_SYMTAG_CASE(VTableShape, PDBSymbolTypeVTableShape)
86 FACTORY_SYMTAG_CASE(VTable, PDBSymbolTypeVTable)
87 FACTORY_SYMTAG_CASE(Custom, PDBSymbolCustom)
88 FACTORY_SYMTAG_CASE(Thunk, PDBSymbolThunk)
89 FACTORY_SYMTAG_CASE(CustomType, PDBSymbolTypeCustom)
90 FACTORY_SYMTAG_CASE(ManagedType, PDBSymbolTypeManaged)
91 FACTORY_SYMTAG_CASE(Dimension, PDBSymbolTypeDimension)
92 default:
93 return std::unique_ptr(new PDBSymbolUnknown(std::move(Symbol)));
94 }
95 }
96
97 void PDBSymbol::dump(llvm::raw_ostream &OS) const { RawSymbol->dump(OS); }
98
99 PDB_SymType PDBSymbol::getSymTag() const { return RawSymbol->getSymTag(); }
100
101 std::unique_ptr
102 PDBSymbol::findChildren(PDB_SymType Type, StringRef Name,
103 PDB_NameSearchFlags Flags) const {
104 return RawSymbol->findChildren(Type, Name, Flags);
105 }
106
107 std::unique_ptr
108 PDBSymbol::findChildrenByRVA(PDB_SymType Type, StringRef Name,
109 PDB_NameSearchFlags Flags, uint32_t RVA) const {
110 return RawSymbol->findChildrenByRVA(Type, Name, Flags, RVA);
111 }
112
113 std::unique_ptr
114 PDBSymbol::findInlineFramesByRVA(uint32_t RVA) const {
115 return RawSymbol->findInlineFramesByRVA(RVA);
116 }
+0
-21
lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp less more
None //===- PDBSymbolCompilandEnv.cpp - compiland env variables ------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #include
10
11 #include "llvm/DebugInfo/PDB/IPDBRawSymbol.h"
12 #include "llvm/DebugInfo/PDB/PDBSymbol.h"
13 #include "llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h"
14
15 using namespace llvm;
16
17 std::string PDBSymbolCompilandEnv::getValue() const {
18 // call RawSymbol->getValue() and convert the result to an std::string.
19 return std::string();
20 }
+0
-20
lib/DebugInfo/PDB/PDBSymbolCustom.cpp less more
None //===- PDBSymbolCustom.cpp - compiler-specific types ------------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #include
10
11 #include "llvm/DebugInfo/PDB/IPDBRawSymbol.h"
12 #include "llvm/DebugInfo/PDB/PDBSymbol.h"
13 #include "llvm/DebugInfo/PDB/PDBSymbolCustom.h"
14
15 using namespace llvm;
16
17 void PDBSymbolCustom::getDataBytes(llvm::SmallVector &bytes) {
18 RawSymbol->getDataBytes(bytes);
19 }
88 add_llvm_unittest(DebugInfoTests
99 ${DebugInfoSources}
1010 )
11
12 add_subdirectory(PDB)
+0
-11
unittests/DebugInfo/PDB/CMakeLists.txt less more
None set(LLVM_LINK_COMPONENTS
1 DebugInfoPDB
2 )
3
4 set(DebugInfoPDBSources
5 PDBApiTest.cpp
6 )
7
8 add_llvm_unittest(DebugInfoPDBTests
9 ${DebugInfoPDBSources}
10 )
+0
-16
unittests/DebugInfo/PDB/Makefile less more
None ##===- unittests/DebugInfo/PDB/Makefile -------------------*- Makefile -*-===##
1 #
2 # The LLVM Compiler Infrastructure
3 #
4 # This file is distributed under the University of Illinois Open Source
5 # License. See LICENSE.TXT for details.
6 #
7 ##===----------------------------------------------------------------------===##
8
9 LEVEL = ../..
10 TESTNAME = DebugInfoPDB
11 LINK_COMPONENTS := DebugInfoPDB object support
12
13 include $(LEVEL)/Makefile.config
14
15 include $(LLVM_SRC_ROOT)/unittests/Makefile.unittest
+0
-349
unittests/DebugInfo/PDB/PDBApiTest.cpp less more
None //===- llvm/unittest/DebugInfo/PDB/PDBApiTest.cpp -------------------------===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #include
10
11 #include "llvm/DebugInfo/PDB/IPDBEnumChildren.h"
12 #include "llvm/DebugInfo/PDB/IPDBRawSymbol.h"
13 #include "llvm/DebugInfo/PDB/PDBSymbol.h"
14 #include "llvm/DebugInfo/PDB/PDBSymbolAnnotation.h"
15 #include "llvm/DebugInfo/PDB/PDBSymbolBlock.h"
16 #include "llvm/DebugInfo/PDB/PDBSymbolCompiland.h"
17 #include "llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h"
18 #include "llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h"
19 #include "llvm/DebugInfo/PDB/PDBSymbolCustom.h"
20 #include "llvm/DebugInfo/PDB/PDBSymbolData.h"
21 #include "llvm/DebugInfo/PDB/PDBSymbolExe.h"
22 #include "llvm/DebugInfo/PDB/PDBSymbolFunc.h"
23 #include "llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h"
24 #include "llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h"
25 #include "llvm/DebugInfo/PDB/PDBSymbolLabel.h"
26 #include "llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h"
27 #include "llvm/DebugInfo/PDB/PDBSymbolThunk.h"
28 #include "llvm/DebugInfo/PDB/PDBSymbolTypeArray.h"
29 #include "llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h"
30 #include "llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h"
31 #include "llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h"
32 #include "llvm/DebugInfo/PDB/PDBSymbolTypeDimension.h"
33 #include "llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h"
34 #include "llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h"
35 #include "llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h"
36 #include "llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h"
37 #include "llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h"
38 #include "llvm/DebugInfo/PDB/PDBSymbolTypePointer.h"
39 #include "llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h"
40 #include "llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h"
41 #include "llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h"
42 #include "llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h"
43 #include "llvm/DebugInfo/PDB/PDBSymbolUnknown.h"
44 #include "llvm/DebugInfo/PDB/PDBSymbolUsingNamespace.h"
45 #include "llvm/DebugInfo/PDB/PDBTypes.h"
46 #include "gtest/gtest.h"
47 using namespace llvm;
48
49 namespace {
50
51 #define MOCK_SYMBOL_ACCESSOR(Func) \
52 auto Func() const->decltype(((IPDBRawSymbol *)nullptr)->Func()) override { \
53 typedef decltype(IPDBRawSymbol::Func()) ReturnType; \
54 return ReturnType(); \
55 }
56
57 class MockRawSymbol : public IPDBRawSymbol {
58 public:
59 MockRawSymbol(PDB_SymType SymType) : Type(SymType) {}
60
61 virtual void dump(llvm::raw_ostream &OS) const {}
62
63 virtual std::unique_ptr
64 findChildren(PDB_SymType Type, StringRef Name,
65 PDB_NameSearchFlags Flags) const {
66 return nullptr;
67 }
68 virtual std::unique_ptr
69 findChildrenByRVA(PDB_SymType Type, StringRef Name, PDB_NameSearchFlags Flags,
70 uint32_t RVA) const {
71 return nullptr;
72 }
73 virtual std::unique_ptr
74 findInlineFramesByRVA(uint32_t RVA) const {
75 return nullptr;
76 }
77
78 virtual void getDataBytes(llvm::SmallVector &bytes) const {}
79
80 PDB_SymType getSymTag() const override { return Type; }
81
82 MOCK_SYMBOL_ACCESSOR(getAccess)
83 MOCK_SYMBOL_ACCESSOR(getAddressOffset)
84 MOCK_SYMBOL_ACCESSOR(getAddressSection)
85 MOCK_SYMBOL_ACCESSOR(getAge)
86 MOCK_SYMBOL_ACCESSOR(getArrayIndexTypeId)
87 MOCK_SYMBOL_ACCESSOR(getBackEndBuild)
88 MOCK_SYMBOL_ACCESSOR(getBackEndMajor)
89 MOCK_SYMBOL_ACCESSOR(getBackEndMinor)
90 MOCK_SYMBOL_ACCESSOR(getBaseDataOffset)
91 MOCK_SYMBOL_ACCESSOR(getBaseDataSlot)
92 MOCK_SYMBOL_ACCESSOR(getBaseSymbolId)
93 MOCK_SYMBOL_ACCESSOR(getBuiltinType)
94 MOCK_SYMBOL_ACCESSOR(getBitPosition)
95 MOCK_SYMBOL_ACCESSOR(getCallingConvention)
96 MOCK_SYMBOL_ACCESSOR(getClassParentId)
97 MOCK_SYMBOL_ACCESSOR(getCompilerName)
98 MOCK_SYMBOL_ACCESSOR(getCount)
99 MOCK_SYMBOL_ACCESSOR(getCountLiveRanges)
100 MOCK_SYMBOL_ACCESSOR(getFrontEndBuild)
101 MOCK_SYMBOL_ACCESSOR(getFrontEndMajor)
102 MOCK_SYMBOL_ACCESSOR(getFrontEndMinor)
103 MOCK_SYMBOL_ACCESSOR(getLanguage)
104 MOCK_SYMBOL_ACCESSOR(getLexicalParentId)
105 MOCK_SYMBOL_ACCESSOR(getLibraryName)
106 MOCK_SYMBOL_ACCESSOR(getLiveRangeStartAddressOffset)
107 MOCK_SYMBOL_ACCESSOR(getLiveRangeStartAddressSection)
108 MOCK_SYMBOL_ACCESSOR(getLiveRangeStartRelativeVirtualAddress)
109 MOCK_SYMBOL_ACCESSOR(getLocalBasePointerRegisterId)
110 MOCK_SYMBOL_ACCESSOR(getLowerBoundId)
111 MOCK_SYMBOL_ACCESSOR(getMemorySpaceKind)
112 MOCK_SYMBOL_ACCESSOR(getName)
113 MOCK_SYMBOL_ACCESSOR(getNumberOfAcceleratorPointerTags)
114 MOCK_SYMBOL_ACCESSOR(getNumberOfColumns)
115 MOCK_SYMBOL_ACCESSOR(getNumberOfModifiers)
116 MOCK_SYMBOL_ACCESSOR(getNumberOfRegisterIndices)
117 MOCK_SYMBOL_ACCESSOR(getNumberOfRows)
118 MOCK_SYMBOL_ACCESSOR(getObjectFileName)
119 MOCK_SYMBOL_ACCESSOR(getOemId)
120 MOCK_SYMBOL_ACCESSOR(getOemSymbolId)
121 MOCK_SYMBOL_ACCESSOR(getOffsetInUdt)
122 MOCK_SYMBOL_ACCESSOR(getPlatform)
123 MOCK_SYMBOL_ACCESSOR(getRank)
124 MOCK_SYMBOL_ACCESSOR(getRegisterId)
125 MOCK_SYMBOL_ACCESSOR(getRegisterType)
126 MOCK_SYMBOL_ACCESSOR(getRelativeVirtualAddress)
127 MOCK_SYMBOL_ACCESSOR(getSamplerSlot)
128 MOCK_SYMBOL_ACCESSOR(getSignature)
129 MOCK_SYMBOL_ACCESSOR(getSizeInUdt)
130 MOCK_SYMBOL_ACCESSOR(getSlot)
131 MOCK_SYMBOL_ACCESSOR(getSourceFileName)
132 MOCK_SYMBOL_ACCESSOR(getStride)
133 MOCK_SYMBOL_ACCESSOR(getSubTypeId)
134 MOCK_SYMBOL_ACCESSOR(getSymbolsFileName)
135 MOCK_SYMBOL_ACCESSOR(getSymIndexId)
136 MOCK_SYMBOL_ACCESSOR(getTargetOffset)
137 MOCK_SYMBOL_ACCESSOR(getTargetRelativeVirtualAddress)
138 MOCK_SYMBOL_ACCESSOR(getTargetVirtualAddress)
139 MOCK_SYMBOL_ACCESSOR(getTargetSection)
140 MOCK_SYMBOL_ACCESSOR(getTextureSlot)
141 MOCK_SYMBOL_ACCESSOR(getTimeStamp)
142 MOCK_SYMBOL_ACCESSOR(getToken)
143 MOCK_SYMBOL_ACCESSOR(getTypeId)
144 MOCK_SYMBOL_ACCESSOR(getUavSlot)
145 MOCK_SYMBOL_ACCESSOR(getUndecoratedName)
146 MOCK_SYMBOL_ACCESSOR(getUnmodifiedTypeId)
147 MOCK_SYMBOL_ACCESSOR(getUpperBoundId)
148 MOCK_SYMBOL_ACCESSOR(getVirtualBaseDispIndex)
149 MOCK_SYMBOL_ACCESSOR(getVirtualBaseOffset)
150 MOCK_SYMBOL_ACCESSOR(getVirtualTableShapeId)
151 MOCK_SYMBOL_ACCESSOR(getDataKind)
152 MOCK_SYMBOL_ACCESSOR(getGuid)
153 MOCK_SYMBOL_ACCESSOR(getOffset)
154 MOCK_SYMBOL_ACCESSOR(getThisAdjust)
155 MOCK_SYMBOL_ACCESSOR(getVirtualBasePointerOffset)
156 MOCK_SYMBOL_ACCESSOR(getLocationType)
157 MOCK_SYMBOL_ACCESSOR(getMachineType)
158 MOCK_SYMBOL_ACCESSOR(getThunkOrdinal)
159 MOCK_SYMBOL_ACCESSOR(getLength)
160 MOCK_SYMBOL_ACCESSOR(getLiveRangeLength)
161 MOCK_SYMBOL_ACCESSOR(getVirtualAddress)
162 MOCK_SYMBOL_ACCESSOR(getUdtKind)
163 MOCK_SYMBOL_ACCESSOR(hasConstructor)
164 MOCK_SYMBOL_ACCESSOR(hasCustomCallingConvention)
165 MOCK_SYMBOL_ACCESSOR(hasFarReturn)
166 MOCK_SYMBOL_ACCESSOR(isCode)
167 MOCK_SYMBOL_ACCESSOR(isCompilerGenerated)
168 MOCK_SYMBOL_ACCESSOR(isConstType)
169 MOCK_SYMBOL_ACCESSOR(isEditAndContinueEnabled)
170 MOCK_SYMBOL_ACCESSOR(isFunction)
171 MOCK_SYMBOL_ACCESSOR(getAddressTaken)
172 MOCK_SYMBOL_ACCESSOR(getNoStackOrdering)
173 MOCK_SYMBOL_ACCESSOR(hasAlloca)
174 MOCK_SYMBOL_ACCESSOR(hasAssignmentOperator)
175 MOCK_SYMBOL_ACCESSOR(hasCTypes)
176 MOCK_SYMBOL_ACCESSOR(hasCastOperator)
177 MOCK_SYMBOL_ACCESSOR(hasDebugInfo)
178 MOCK_SYMBOL_ACCESSOR(hasEH)
179 MOCK_SYMBOL_ACCESSOR(hasEHa)
180 MOCK_SYMBOL_ACCESSOR(hasInlAsm)
181 MOCK_SYMBOL_ACCESSOR(hasInlineAttribute)
182 MOCK_SYMBOL_ACCESSOR(hasInterruptReturn)
183 MOCK_SYMBOL_ACCESSOR(hasLongJump)
184 MOCK_SYMBOL_ACCESSOR(hasManagedCode)
185 MOCK_SYMBOL_ACCESSOR(hasNestedTypes)
186 MOCK_SYMBOL_ACCESSOR(hasNoInlineAttribute)
187 MOCK_SYMBOL_ACCESSOR(hasNoReturnAttribute)
188 MOCK_SYMBOL_ACCESSOR(hasOptimizedCodeDebugInfo)
189 MOCK_SYMBOL_ACCESSOR(hasOverloadedOperator)
190 MOCK_SYMBOL_ACCESSOR(hasSEH)
191 MOCK_SYMBOL_ACCESSOR(hasSecurityChecks)
192 MOCK_SYMBOL_ACCESSOR(hasSetJump)
193 MOCK_SYMBOL_ACCESSOR(hasStrictGSCheck)
194 MOCK_SYMBOL_ACCESSOR(isAcceleratorGroupSharedLocal)
195 MOCK_SYMBOL_ACCESSOR(isAcceleratorPointerTagLiveRange)
196 MOCK_SYMBOL_ACCESSOR(isAcceleratorStubFunction)
197 MOCK_SYMBOL_ACCESSOR(isAggregated)
198 MOCK_SYMBOL_ACCESSOR(isIntroVirtualFunction)
199 MOCK_SYMBOL_ACCESSOR(isCVTCIL)
200 MOCK_SYMBOL_ACCESSOR(isConstructorVirtualBase)
201 MOCK_SYMBOL_ACCESSOR(isCxxReturnUdt)
202 MOCK_SYMBOL_ACCESSOR(isDataAligned)
203 MOCK_SYMBOL_ACCESSOR(isHLSLData)
204 MOCK_SYMBOL_ACCESSOR(isHotpatchable)
205 MOCK_SYMBOL_ACCESSOR(isIndirectVirtualBaseClass)
206 MOCK_SYMBOL_ACCESSOR(isInterfaceUdt)
207 MOCK_SYMBOL_ACCESSOR(isIntrinsic)
208 MOCK_SYMBOL_ACCESSOR(isLTCG)
209 MOCK_SYMBOL_ACCESSOR(isLocationControlFlowDependent)
210 MOCK_SYMBOL_ACCESSOR(isMSILNetmodule)
211 MOCK_SYMBOL_ACCESSOR(isMatrixRowMajor)
212 MOCK_SYMBOL_ACCESSOR(isManagedCode)
213 MOCK_SYMBOL_ACCESSOR(isMSILCode)
214 MOCK_SYMBOL_ACCESSOR(isMultipleInheritance)
215 MOCK_SYMBOL_ACCESSOR(isNaked)
216 MOCK_SYMBOL_ACCESSOR(isNested)
217 MOCK_SYMBOL_ACCESSOR(isOptimizedAway)
218 MOCK_SYMBOL_ACCESSOR(isPacked)
219 MOCK_SYMBOL_ACCESSOR(isPointerBasedOnSymbolValue)
220 MOCK_SYMBOL_ACCESSOR(isPointerToDataMember)
221 MOCK_SYMBOL_ACCESSOR(isPointerToMemberFunction)
222 MOCK_SYMBOL_ACCESSOR(isPureVirtual)
223 MOCK_SYMBOL_ACCESSOR(isRValueReference)
224 MOCK_SYMBOL_ACCESSOR(isRefUdt)
225 MOCK_SYMBOL_ACCESSOR(isReference)
226 MOCK_SYMBOL_ACCESSOR(isRestrictedType)
227 MOCK_SYMBOL_ACCESSOR(isReturnValue)
228 MOCK_SYMBOL_ACCESSOR(isSafeBuffers)
229 MOCK_SYMBOL_ACCESSOR(isScoped)
230 MOCK_SYMBOL_ACCESSOR(isSdl)
231 MOCK_SYMBOL_ACCESSOR(isSingleInheritance)
232 MOCK_SYMBOL_ACCESSOR(isSplitted)
233 MOCK_SYMBOL_ACCESSOR(isStatic)
234 MOCK_SYMBOL_ACCESSOR(hasPrivateSymbols)
235 MOCK_SYMBOL_ACCESSOR(isUnalignedType)
236 MOCK_SYMBOL_ACCESSOR(isUnreached)
237 MOCK_SYMBOL_ACCESSOR(isValueUdt)
238 MOCK_SYMBOL_ACCESSOR(isVirtual)
239 MOCK_SYMBOL_ACCESSOR(isVirtualBaseClass)
240 MOCK_SYMBOL_ACCESSOR(isVirtualInheritance)
241 MOCK_SYMBOL_ACCESSOR(isVolatileType)
242
243 private:
244 PDB_SymType Type;
245 };
246
247 class PDBApiTest : public testing::Test {
248 public:
249 std::hash_map> SymbolMap;
250
251 void SetUp() override {
252 InsertItemWithTag(PDB_SymType::None);
253 InsertItemWithTag(PDB_SymType::Exe);
254 InsertItemWithTag(PDB_SymType::Compiland);
255 InsertItemWithTag(PDB_SymType::CompilandDetails);
256 InsertItemWithTag(PDB_SymType::CompilandEnv);
257 InsertItemWithTag(PDB_SymType::Function);
258 InsertItemWithTag(PDB_SymType::Block);
259 InsertItemWithTag(PDB_SymType::Data);
260 InsertItemWithTag(PDB_SymType::Annotation);
261 InsertItemWithTag(PDB_SymType::Label);
262 InsertItemWithTag(PDB_SymType::PublicSymbol);
263 InsertItemWithTag(PDB_SymType::UDT);
264 InsertItemWithTag(PDB_SymType::Enum);
265 InsertItemWithTag(PDB_SymType::FunctionSig);
266 InsertItemWithTag(PDB_SymType::PointerType);
267 InsertItemWithTag(PDB_SymType::ArrayType);
268 InsertItemWithTag(PDB_SymType::BuiltinType);
269 InsertItemWithTag(PDB_SymType::Typedef);
270 InsertItemWithTag(PDB_SymType::BaseClass);
271 InsertItemWithTag(PDB_SymType::Friend);
272 InsertItemWithTag(PDB_SymType::FunctionArg);
273 InsertItemWithTag(PDB_SymType::FuncDebugStart);
274 InsertItemWithTag(PDB_SymType::FuncDebugEnd);
275 InsertItemWithTag(PDB_SymType::UsingNamespace);
276 InsertItemWithTag(PDB_SymType::VTableShape);
277 InsertItemWithTag(PDB_SymType::VTable);
278 InsertItemWithTag(PDB_SymType::Custom);
279 InsertItemWithTag(PDB_SymType::Thunk);
280 InsertItemWithTag(PDB_SymType::CustomType);
281 InsertItemWithTag(PDB_SymType::ManagedType);
282 InsertItemWithTag(PDB_SymType::Dimension);
283 InsertItemWithTag(PDB_SymType::Max);
284 }
285
286 private:
287 void InsertItemWithTag(PDB_SymType Tag) {
288 auto RawSymbol = std::unique_ptr(new MockRawSymbol(Tag));
289 auto Symbol = PDBSymbol::create(std::move(RawSymbol));
290 SymbolMap.insert(std::make_pair(Tag, std::move(Symbol)));
291 }
292
293 public:
294 template void VerifyDyncast(PDB_SymType Tag) {
295 for (auto item = SymbolMap.begin(); item != SymbolMap.end(); ++item) {
296 EXPECT_EQ(item->first == Tag, llvm::isa(*item->second));
297 }
298 }
299
300 void VerifyUnknownDyncasts() {
301 for (auto item = SymbolMap.begin(); item != SymbolMap.end(); ++item) {
302 bool should_match = false;
303 if (item->first == PDB_SymType::None || item->first >= PDB_SymType::Max)
304 should_match = true;
305
306 EXPECT_EQ(should_match, llvm::isa(*item->second));
307 }
308 }
309 };
310
311 TEST_F(PDBApiTest, Dyncast) {
312
313 // Most of the types have a one-to-one mapping between Tag and concrete type.
314 VerifyDyncast(PDB_SymType::Exe);
315 VerifyDyncast(PDB_SymType::Compiland);
316 VerifyDyncast(PDB_SymType::CompilandDetails);
317 VerifyDyncast(PDB_SymType::CompilandEnv);
318 VerifyDyncast(PDB_SymType::Function);
319 VerifyDyncast(PDB_SymType::Block);
320 VerifyDyncast(PDB_SymType::Data);
321 VerifyDyncast(PDB_SymType::Annotation);
322 VerifyDyncast(PDB_SymType::Label);
323 VerifyDyncast(PDB_SymType::PublicSymbol);
324 VerifyDyncast(PDB_SymType::UDT);
325 VerifyDyncast(PDB_SymType::Enum);
326 VerifyDyncast(PDB_SymType::FunctionSig);
327 VerifyDyncast(PDB_SymType::PointerType);
328 VerifyDyncast(PDB_SymType::ArrayType);
329 VerifyDyncast(PDB_SymType::BuiltinType);
330 VerifyDyncast(PDB_SymType::Typedef);
331 VerifyDyncast(PDB_SymType::BaseClass);
332 VerifyDyncast(PDB_SymType::Friend);
333 VerifyDyncast(PDB_SymType::FunctionArg);
334 VerifyDyncast(PDB_SymType::FuncDebugStart);
335 VerifyDyncast(PDB_SymType::FuncDebugEnd);
336 VerifyDyncast(PDB_SymType::UsingNamespace);
337 VerifyDyncast(PDB_SymType::VTableShape);
338 VerifyDyncast(PDB_SymType::VTable);
339 VerifyDyncast(PDB_SymType::Custom);
340 VerifyDyncast(PDB_SymType::Thunk);
341 VerifyDyncast(PDB_SymType::CustomType);
342 VerifyDyncast(PDB_SymType::ManagedType);
343 VerifyDyncast(PDB_SymType::Dimension);
344
345 VerifyUnknownDyncasts();
346 }
347
348 } // end anonymous namespace