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