LLVM  6.0.0svn
IPDBRawSymbol.h
Go to the documentation of this file.
1 //===- IPDBRawSymbol.h - base interface for PDB symbol types ----*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_DEBUGINFO_PDB_IPDBRAWSYMBOL_H
11 #define LLVM_DEBUGINFO_PDB_IPDBRAWSYMBOL_H
12 
13 #include "PDBTypes.h"
14 #include "llvm/ADT/SmallVector.h"
15 #include "llvm/ADT/StringRef.h"
17 #include <memory>
18 
19 namespace llvm {
20 class raw_ostream;
21 
22 namespace pdb {
23 
24 class PDBSymbolTypeVTable;
25 class PDBSymbolTypeVTableShape;
26 
27 /// IPDBRawSymbol defines an interface used to represent an arbitrary symbol.
28 /// It exposes a monolithic interface consisting of accessors for the union of
29 /// all properties that are valid for any symbol type. This interface is then
30 /// wrapped by a concrete class which exposes only those set of methods valid
31 /// for this particular symbol type. See PDBSymbol.h for more details.
33 public:
34  virtual ~IPDBRawSymbol();
35 
36  virtual void dump(raw_ostream &OS, int Indent) const = 0;
37 
38  virtual std::unique_ptr<IPDBEnumSymbols>
39  findChildren(PDB_SymType Type) const = 0;
40 
41  virtual std::unique_ptr<IPDBEnumSymbols>
43  PDB_NameSearchFlags Flags) const = 0;
44  virtual std::unique_ptr<IPDBEnumSymbols>
46  uint32_t RVA) const = 0;
47  virtual std::unique_ptr<IPDBEnumSymbols>
48  findInlineFramesByRVA(uint32_t RVA) const = 0;
49 
50  virtual void getDataBytes(llvm::SmallVector<uint8_t, 32> &bytes) const = 0;
51  virtual void getBackEndVersion(VersionInfo &Version) const = 0;
52  virtual PDB_MemberAccess getAccess() const = 0;
53  virtual uint32_t getAddressOffset() const = 0;
54  virtual uint32_t getAddressSection() const = 0;
55  virtual uint32_t getAge() const = 0;
56  virtual uint32_t getArrayIndexTypeId() const = 0;
57  virtual uint32_t getBaseDataOffset() const = 0;
58  virtual uint32_t getBaseDataSlot() const = 0;
59  virtual uint32_t getBaseSymbolId() const = 0;
60  virtual PDB_BuiltinType getBuiltinType() const = 0;
61  virtual uint32_t getBitPosition() const = 0;
62  virtual PDB_CallingConv getCallingConvention() const = 0;
63  virtual uint32_t getClassParentId() const = 0;
64  virtual std::string getCompilerName() const = 0;
65  virtual uint32_t getCount() const = 0;
66  virtual uint32_t getCountLiveRanges() const = 0;
67  virtual void getFrontEndVersion(VersionInfo &Version) const = 0;
68  virtual PDB_Lang getLanguage() const = 0;
69  virtual uint32_t getLexicalParentId() const = 0;
70  virtual std::string getLibraryName() const = 0;
71  virtual uint32_t getLiveRangeStartAddressOffset() const = 0;
72  virtual uint32_t getLiveRangeStartAddressSection() const = 0;
75  virtual uint32_t getLowerBoundId() const = 0;
76  virtual uint32_t getMemorySpaceKind() const = 0;
77  virtual std::string getName() const = 0;
78  virtual uint32_t getNumberOfAcceleratorPointerTags() const = 0;
79  virtual uint32_t getNumberOfColumns() const = 0;
80  virtual uint32_t getNumberOfModifiers() const = 0;
81  virtual uint32_t getNumberOfRegisterIndices() const = 0;
82  virtual uint32_t getNumberOfRows() const = 0;
83  virtual std::string getObjectFileName() const = 0;
84  virtual uint32_t getOemId() const = 0;
85  virtual uint32_t getOemSymbolId() const = 0;
86  virtual uint32_t getOffsetInUdt() const = 0;
87  virtual PDB_Cpu getPlatform() const = 0;
88  virtual uint32_t getRank() const = 0;
89  virtual codeview::RegisterId getRegisterId() const = 0;
90  virtual uint32_t getRegisterType() const = 0;
91  virtual uint32_t getRelativeVirtualAddress() const = 0;
92  virtual uint32_t getSamplerSlot() const = 0;
93  virtual uint32_t getSignature() const = 0;
94  virtual uint32_t getSizeInUdt() const = 0;
95  virtual uint32_t getSlot() const = 0;
96  virtual std::string getSourceFileName() const = 0;
97  virtual uint32_t getStride() const = 0;
98  virtual uint32_t getSubTypeId() const = 0;
99  virtual std::string getSymbolsFileName() const = 0;
100  virtual uint32_t getSymIndexId() const = 0;
101  virtual uint32_t getTargetOffset() const = 0;
102  virtual uint32_t getTargetRelativeVirtualAddress() const = 0;
103  virtual uint64_t getTargetVirtualAddress() const = 0;
104  virtual uint32_t getTargetSection() const = 0;
105  virtual uint32_t getTextureSlot() const = 0;
106  virtual uint32_t getTimeStamp() const = 0;
107  virtual uint32_t getToken() const = 0;
108  virtual uint32_t getTypeId() const = 0;
109  virtual uint32_t getUavSlot() const = 0;
110  virtual std::string getUndecoratedName() const = 0;
111  virtual std::string getUndecoratedNameEx(PDB_UndnameFlags Flags) const = 0;
112  virtual uint32_t getUnmodifiedTypeId() const = 0;
113  virtual uint32_t getUpperBoundId() const = 0;
114  virtual Variant getValue() const = 0;
115  virtual uint32_t getVirtualBaseDispIndex() const = 0;
116  virtual uint32_t getVirtualBaseOffset() const = 0;
117  virtual std::unique_ptr<PDBSymbolTypeBuiltin>
118  getVirtualBaseTableType() const = 0;
119  virtual uint32_t getVirtualTableShapeId() const = 0;
120  virtual PDB_DataKind getDataKind() const = 0;
121  virtual PDB_SymType getSymTag() const = 0;
122  virtual codeview::GUID getGuid() const = 0;
123  virtual int32_t getOffset() const = 0;
124  virtual int32_t getThisAdjust() const = 0;
125  virtual int32_t getVirtualBasePointerOffset() const = 0;
126  virtual PDB_LocType getLocationType() const = 0;
127  virtual PDB_Machine getMachineType() const = 0;
128  virtual codeview::ThunkOrdinal getThunkOrdinal() const = 0;
129  virtual uint64_t getLength() const = 0;
130  virtual uint64_t getLiveRangeLength() const = 0;
131  virtual uint64_t getVirtualAddress() const = 0;
132  virtual PDB_UdtType getUdtKind() const = 0;
133  virtual bool hasConstructor() const = 0;
134  virtual bool hasCustomCallingConvention() const = 0;
135  virtual bool hasFarReturn() const = 0;
136  virtual bool isCode() const = 0;
137  virtual bool isCompilerGenerated() const = 0;
138  virtual bool isConstType() const = 0;
139  virtual bool isEditAndContinueEnabled() const = 0;
140  virtual bool isFunction() const = 0;
141  virtual bool getAddressTaken() const = 0;
142  virtual bool getNoStackOrdering() const = 0;
143  virtual bool hasAlloca() const = 0;
144  virtual bool hasAssignmentOperator() const = 0;
145  virtual bool hasCTypes() const = 0;
146  virtual bool hasCastOperator() const = 0;
147  virtual bool hasDebugInfo() const = 0;
148  virtual bool hasEH() const = 0;
149  virtual bool hasEHa() const = 0;
150  virtual bool hasFramePointer() const = 0;
151  virtual bool hasInlAsm() const = 0;
152  virtual bool hasInlineAttribute() const = 0;
153  virtual bool hasInterruptReturn() const = 0;
154  virtual bool hasLongJump() const = 0;
155  virtual bool hasManagedCode() const = 0;
156  virtual bool hasNestedTypes() const = 0;
157  virtual bool hasNoInlineAttribute() const = 0;
158  virtual bool hasNoReturnAttribute() const = 0;
159  virtual bool hasOptimizedCodeDebugInfo() const = 0;
160  virtual bool hasOverloadedOperator() const = 0;
161  virtual bool hasSEH() const = 0;
162  virtual bool hasSecurityChecks() const = 0;
163  virtual bool hasSetJump() const = 0;
164  virtual bool hasStrictGSCheck() const = 0;
165  virtual bool isAcceleratorGroupSharedLocal() const = 0;
166  virtual bool isAcceleratorPointerTagLiveRange() const = 0;
167  virtual bool isAcceleratorStubFunction() const = 0;
168  virtual bool isAggregated() const = 0;
169  virtual bool isIntroVirtualFunction() const = 0;
170  virtual bool isCVTCIL() const = 0;
171  virtual bool isConstructorVirtualBase() const = 0;
172  virtual bool isCxxReturnUdt() const = 0;
173  virtual bool isDataAligned() const = 0;
174  virtual bool isHLSLData() const = 0;
175  virtual bool isHotpatchable() const = 0;
176  virtual bool isIndirectVirtualBaseClass() const = 0;
177  virtual bool isInterfaceUdt() const = 0;
178  virtual bool isIntrinsic() const = 0;
179  virtual bool isLTCG() const = 0;
180  virtual bool isLocationControlFlowDependent() const = 0;
181  virtual bool isMSILNetmodule() const = 0;
182  virtual bool isMatrixRowMajor() const = 0;
183  virtual bool isManagedCode() const = 0;
184  virtual bool isMSILCode() const = 0;
185  virtual bool isMultipleInheritance() const = 0;
186  virtual bool isNaked() const = 0;
187  virtual bool isNested() const = 0;
188  virtual bool isOptimizedAway() const = 0;
189  virtual bool isPacked() const = 0;
190  virtual bool isPointerBasedOnSymbolValue() const = 0;
191  virtual bool isPointerToDataMember() const = 0;
192  virtual bool isPointerToMemberFunction() const = 0;
193  virtual bool isPureVirtual() const = 0;
194  virtual bool isRValueReference() const = 0;
195  virtual bool isRefUdt() const = 0;
196  virtual bool isReference() const = 0;
197  virtual bool isRestrictedType() const = 0;
198  virtual bool isReturnValue() const = 0;
199  virtual bool isSafeBuffers() const = 0;
200  virtual bool isScoped() const = 0;
201  virtual bool isSdl() const = 0;
202  virtual bool isSingleInheritance() const = 0;
203  virtual bool isSplitted() const = 0;
204  virtual bool isStatic() const = 0;
205  virtual bool hasPrivateSymbols() const = 0;
206  virtual bool isUnalignedType() const = 0;
207  virtual bool isUnreached() const = 0;
208  virtual bool isValueUdt() const = 0;
209  virtual bool isVirtual() const = 0;
210  virtual bool isVirtualBaseClass() const = 0;
211  virtual bool isVirtualInheritance() const = 0;
212  virtual bool isVolatileType() const = 0;
213  virtual bool wasInlined() const = 0;
214  virtual std::string getUnused() const = 0;
215 };
216 
217 } // namespace pdb
218 } // namespace llvm
219 
220 #endif
virtual uint32_t getTextureSlot() const =0
virtual uint64_t getVirtualAddress() const =0
virtual PDB_UdtType getUdtKind() const =0
virtual uint32_t getTargetSection() const =0
virtual bool hasInlAsm() const =0
virtual bool isStatic() const =0
virtual bool hasOptimizedCodeDebugInfo() const =0
virtual uint32_t getLexicalParentId() const =0
virtual bool isAcceleratorStubFunction() const =0
virtual bool isIndirectVirtualBaseClass() const =0
virtual PDB_BuiltinType getBuiltinType() const =0
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
virtual bool isDataAligned() const =0
virtual void getFrontEndVersion(VersionInfo &Version) const =0
virtual std::unique_ptr< IPDBEnumSymbols > findChildren(PDB_SymType Type) const =0
virtual bool isCode() const =0
virtual uint32_t getArrayIndexTypeId() const =0
virtual bool isMatrixRowMajor() const =0
virtual bool isConstType() const =0
virtual PDB_SymType getSymTag() const =0
virtual bool hasCustomCallingConvention() const =0
PDB_UdtType
These values correspond to the UdtKind enumeration, and are documented here: https://msdn.microsoft.com/en-us/library/wcstk66t.aspx.
Definition: PDBTypes.h:216
virtual bool hasDebugInfo() const =0
virtual uint32_t getVirtualTableShapeId() const =0
virtual uint32_t getTimeStamp() const =0
virtual bool isMultipleInheritance() const =0
virtual bool isFunction() const =0
virtual PDB_Lang getLanguage() const =0
PDB_NameSearchFlags
Defines flags used for enumerating child symbols.
Definition: PDBTypes.h:92
virtual uint32_t getTargetOffset() const =0
virtual bool isRestrictedType() const =0
virtual uint32_t getLiveRangeStartAddressOffset() const =0
virtual std::unique_ptr< PDBSymbolTypeBuiltin > getVirtualBaseTableType() const =0
virtual uint32_t getBitPosition() const =0
virtual bool getAddressTaken() const =0
virtual std::unique_ptr< IPDBEnumSymbols > findChildrenByRVA(PDB_SymType Type, StringRef Name, PDB_NameSearchFlags Flags, uint32_t RVA) const =0
virtual codeview::RegisterId getRegisterId() const =0
virtual bool isCxxReturnUdt() const =0
virtual bool isSplitted() const =0
virtual PDB_Machine getMachineType() const =0
virtual bool isPacked() const =0
virtual int32_t getThisAdjust() const =0
virtual std::string getSourceFileName() const =0
virtual uint32_t getSizeInUdt() const =0
virtual bool isNaked() const =0
virtual uint32_t getBaseDataOffset() const =0
virtual bool hasAssignmentOperator() const =0
virtual void dump(raw_ostream &OS, int Indent) const =0
virtual bool hasStrictGSCheck() const =0
virtual uint32_t getLiveRangeStartRelativeVirtualAddress() const =0
virtual PDB_MemberAccess getAccess() const =0
virtual uint32_t getClassParentId() const =0
This represents the &#39;GUID&#39; type from windows.h.
Definition: GUID.h:22
virtual bool isPureVirtual() const =0
virtual codeview::ThunkOrdinal getThunkOrdinal() const =0
virtual std::string getLibraryName() const =0
virtual bool isHotpatchable() const =0
virtual bool isValueUdt() const =0
virtual int32_t getOffset() const =0
virtual bool hasManagedCode() const =0
virtual bool hasOverloadedOperator() const =0
virtual uint32_t getBaseDataSlot() const =0
virtual std::string getUndecoratedNameEx(PDB_UndnameFlags Flags) const =0
virtual uint32_t getSignature() const =0
virtual std::string getUnused() const =0
virtual bool isUnreached() const =0
PDB_UndnameFlags
These values correspond to the flags that can be combined to control the return of an undecorated nam...
Definition: PDBTypes.h:252
virtual uint32_t getStride() const =0
virtual uint32_t getNumberOfColumns() const =0
virtual bool isReference() const =0
virtual uint32_t getSubTypeId() const =0
virtual std::string getName() const =0
virtual bool hasNoReturnAttribute() const =0
virtual uint32_t getRank() const =0
virtual bool isLocationControlFlowDependent() const =0
virtual bool isSdl() const =0
PDB_SymType
These values correspond to the SymTagEnum enumeration, and are documented here: https://msdn.microsoft.com/en-us/library/bkedss5f.aspx.
Definition: PDBTypes.h:162
virtual uint32_t getVirtualBaseDispIndex() const =0
virtual uint64_t getTargetVirtualAddress() const =0
virtual bool isPointerBasedOnSymbolValue() const =0
virtual bool hasSEH() const =0
The instances of the Type class are immutable: once they are created, they are never changed...
Definition: Type.h:46
virtual bool isInterfaceUdt() const =0
virtual bool isVirtual() const =0
virtual std::unique_ptr< IPDBEnumSymbols > findInlineFramesByRVA(uint32_t RVA) const =0
virtual uint32_t getUavSlot() const =0
virtual uint32_t getVirtualBaseOffset() const =0
PDB_DataKind
These values correspond to the DataKind enumeration, and are documented here: https://msdn.microsoft.com/en-us/library/b2x2t313.aspx.
Definition: PDBTypes.h:147
virtual bool isOptimizedAway() const =0
virtual uint32_t getAddressOffset() const =0
IPDBRawSymbol defines an interface used to represent an arbitrary symbol.
Definition: IPDBRawSymbol.h:32
virtual uint32_t getBaseSymbolId() const =0
virtual uint32_t getOemId() const =0
virtual uint32_t getOemSymbolId() const =0
virtual bool hasEH() const =0
virtual uint32_t getRelativeVirtualAddress() const =0
virtual uint32_t getUpperBoundId() const =0
virtual uint32_t getOffsetInUdt() const =0
virtual uint32_t getRegisterType() const =0
virtual bool isUnalignedType() const =0
virtual bool getNoStackOrdering() const =0
PDB_LocType
These values correspond to the LocationType enumeration, and are documented here: https://msdn...
Definition: PDBTypes.h:199
virtual codeview::GUID getGuid() const =0
virtual bool isRValueReference() const =0
virtual std::string getCompilerName() const =0
virtual bool isHLSLData() const =0
virtual bool isAggregated() const =0
virtual bool wasInlined() const =0
virtual uint32_t getMemorySpaceKind() const =0
virtual uint32_t getLiveRangeStartAddressSection() const =0
virtual bool hasInlineAttribute() const =0
SourceLanguage
These values correspond to the CV_CFL_LANG enumeration, and are documented here: https://msdn.microsoft.com/en-us/library/bw3aekw6.aspx.
Definition: CodeView.h:144
virtual uint32_t getSlot() const =0
virtual Variant getValue() const =0
virtual uint32_t getAge() const =0
virtual uint32_t getNumberOfModifiers() const =0
virtual int32_t getVirtualBasePointerOffset() const =0
CPUType
These values correspond to the CV_CPU_TYPE_e enumeration, and are documented here: https://msdn...
Definition: CodeView.h:79
virtual PDB_LocType getLocationType() const =0
virtual uint32_t getUnmodifiedTypeId() const =0
virtual uint64_t getLiveRangeLength() const =0
virtual bool isVolatileType() const =0
virtual bool isSafeBuffers() const =0
virtual uint32_t getToken() const =0
virtual bool hasSecurityChecks() const =0
virtual bool isSingleInheritance() const =0
virtual bool isReturnValue() const =0
virtual std::string getSymbolsFileName() const =0
virtual std::string getUndecoratedName() const =0
virtual bool isCVTCIL() const =0
virtual uint32_t getSamplerSlot() const =0
virtual bool hasSetJump() const =0
virtual PDB_CallingConv getCallingConvention() const =0
virtual uint32_t getTypeId() const =0
virtual uint32_t getCountLiveRanges() const =0
virtual bool hasCTypes() const =0
virtual bool isCompilerGenerated() const =0
virtual bool isIntrinsic() const =0
virtual bool hasNoInlineAttribute() const =0
virtual bool isManagedCode() const =0
virtual bool isIntroVirtualFunction() const =0
virtual bool isScoped() const =0
virtual bool isAcceleratorPointerTagLiveRange() const =0
virtual void getBackEndVersion(VersionInfo &Version) const =0
virtual bool hasFramePointer() const =0
virtual bool isPointerToMemberFunction() const =0
virtual bool isEditAndContinueEnabled() const =0
virtual bool hasFarReturn() const =0
virtual uint32_t getAddressSection() const =0
virtual uint32_t getLowerBoundId() const =0
virtual PDB_DataKind getDataKind() const =0
virtual bool isPointerToDataMember() const =0
virtual bool isVirtualInheritance() const =0
ThunkOrdinal
These values correspond to the THUNK_ORDINAL enumeration.
Definition: CodeView.h:514
PDB_BuiltinType
These values correspond to the Basictype enumeration, and are documented here: https://msdn.microsoft.com/en-us/library/4szdtzc3.aspx.
Definition: PDBTypes.h:228
virtual bool isRefUdt() const =0
virtual bool isMSILNetmodule() const =0
virtual bool isVirtualBaseClass() const =0
virtual uint32_t getSymIndexId() const =0
virtual bool hasLongJump() const =0
virtual bool hasEHa() const =0
virtual uint32_t getNumberOfRows() const =0
virtual bool hasNestedTypes() const =0
virtual bool isNested() const =0
virtual uint32_t getNumberOfAcceleratorPointerTags() const =0
virtual bool hasCastOperator() const =0
virtual std::string getObjectFileName() const =0
virtual void getDataBytes(llvm::SmallVector< uint8_t, 32 > &bytes) const =0
CallingConvention
These values correspond to the CV_call_e enumeration, and are documented at the following locations: ...
Definition: CodeView.h:173
virtual bool isAcceleratorGroupSharedLocal() const =0
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:44
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49
virtual PDB_Cpu getPlatform() const =0
virtual bool hasAlloca() const =0
virtual bool hasPrivateSymbols() const =0
virtual uint32_t getNumberOfRegisterIndices() const =0
virtual uint32_t getTargetRelativeVirtualAddress() const =0
virtual bool hasConstructor() const =0
virtual bool isMSILCode() const =0
virtual bool hasInterruptReturn() const =0
const uint64_t Version
Definition: InstrProf.h:867
virtual uint32_t getCount() const =0
virtual bool isLTCG() const =0
virtual uint64_t getLength() const =0
virtual bool isConstructorVirtualBase() const =0
virtual codeview::RegisterId getLocalBasePointerRegisterId() const =0
PDB_MemberAccess
Definition: PDBTypes.h:275