1 //===- DIARawSymbol.cpp - DIA implementation of IPDBRawSymbol ---*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #include "llvm/DebugInfo/PDB/DIA/DIARawSymbol.h"
10 #include "llvm/ADT/ArrayRef.h"
11 #include "llvm/ADT/STLExtras.h"
12 #include "llvm/DebugInfo/CodeView/Formatters.h"
13 #include "llvm/DebugInfo/PDB/DIA/DIAEnumLineNumbers.h"
14 #include "llvm/DebugInfo/PDB/DIA/DIAEnumSymbols.h"
15 #include "llvm/DebugInfo/PDB/DIA/DIALineNumber.h"
16 #include "llvm/DebugInfo/PDB/DIA/DIASession.h"
17 #include "llvm/DebugInfo/PDB/DIA/DIAUtils.h"
18 #include "llvm/DebugInfo/PDB/PDBExtras.h"
19 #include "llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h"
20 #include "llvm/DebugInfo/PDB/PDBSymbolTypePointer.h"
21 #include "llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h"
22 #include "llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h"
23 #include "llvm/Support/ConvertUTF.h"
24 #include "llvm/Support/raw_ostream.h"
27 using namespace llvm::pdb
;
30 Variant
VariantFromVARIANT(const VARIANT
&V
) {
34 Result
.Value
.Int8
= V
.cVal
;
35 Result
.Type
= PDB_VariantType::Int8
;
38 Result
.Value
.Int16
= V
.iVal
;
39 Result
.Type
= PDB_VariantType::Int16
;
42 Result
.Value
.Int32
= V
.intVal
;
43 Result
.Type
= PDB_VariantType::Int32
;
46 Result
.Value
.Int64
= V
.llVal
;
47 Result
.Type
= PDB_VariantType::Int64
;
50 Result
.Value
.UInt8
= V
.bVal
;
51 Result
.Type
= PDB_VariantType::UInt8
;
54 Result
.Value
.UInt16
= V
.uiVal
;
55 Result
.Type
= PDB_VariantType::UInt16
;
58 Result
.Value
.UInt32
= V
.uintVal
;
59 Result
.Type
= PDB_VariantType::UInt32
;
62 Result
.Value
.UInt64
= V
.ullVal
;
63 Result
.Type
= PDB_VariantType::UInt64
;
66 Result
.Value
.Bool
= (V
.boolVal
== VARIANT_TRUE
) ? true : false;
67 Result
.Type
= PDB_VariantType::Bool
;
70 Result
.Value
.Single
= V
.fltVal
;
71 Result
.Type
= PDB_VariantType::Single
;
74 Result
.Value
.Double
= V
.dblVal
;
75 Result
.Type
= PDB_VariantType::Double
;
78 const char *SrcBytes
= reinterpret_cast<const char *>(V
.bstrVal
);
79 llvm::ArrayRef
<char> SrcByteArray(SrcBytes
, SysStringByteLen(V
.bstrVal
));
81 if (!llvm::convertUTF16ToUTF8String(SrcByteArray
, Result8
))
82 Result
.Value
.String
= nullptr;
83 Result
.Value
.String
= new char[Result8
.length() + 1];
84 ::strcpy(Result
.Value
.String
, Result8
.c_str());
85 Result
.Type
= PDB_VariantType::String
;
89 Result
.Type
= PDB_VariantType::Unknown
;
95 template <typename ArgType
>
96 ArgType
PrivateGetDIAValue(IDiaSymbol
*Symbol
,
97 HRESULT (__stdcall
IDiaSymbol::*Method
)(ArgType
*)) {
99 if (S_OK
== (Symbol
->*Method
)(&Value
))
100 return static_cast<ArgType
>(Value
);
105 template <typename ArgType
, typename RetType
>
106 RetType
PrivateGetDIAValue(IDiaSymbol
*Symbol
,
107 HRESULT (__stdcall
IDiaSymbol::*Method
)(ArgType
*)) {
109 if (S_OK
== (Symbol
->*Method
)(&Value
))
110 return static_cast<RetType
>(Value
);
116 PrivateGetDIAValue(IDiaSymbol
*Symbol
,
117 HRESULT (__stdcall
IDiaSymbol::*Method
)(BSTR
*)) {
118 return invokeBstrMethod(*Symbol
, Method
);
122 PrivateGetDIAValue(IDiaSymbol
*Symbol
,
123 HRESULT (__stdcall
IDiaSymbol::*Method
)(GUID
*)) {
125 if (S_OK
!= (Symbol
->*Method
)(&Result
))
126 return codeview::GUID();
128 static_assert(sizeof(codeview::GUID
) == sizeof(GUID
),
129 "GUID is the wrong size!");
130 codeview::GUID IdResult
;
131 ::memcpy(&IdResult
, &Result
, sizeof(GUID
));
135 template <typename PrintType
, typename ArgType
>
136 void DumpDIAValueAs(llvm::raw_ostream
&OS
, int Indent
, StringRef Name
,
138 HRESULT (__stdcall
IDiaSymbol::*Method
)(ArgType
*)) {
140 if (S_OK
== (Symbol
->*Method
)(&Value
))
141 dumpSymbolField(OS
, Name
, static_cast<PrintType
>(Value
), Indent
);
144 void DumpDIAIdValue(llvm::raw_ostream
&OS
, int Indent
, StringRef Name
,
146 HRESULT (__stdcall
IDiaSymbol::*Method
)(DWORD
*),
147 const IPDBSession
&Session
, PdbSymbolIdField FieldId
,
148 PdbSymbolIdField ShowFlags
, PdbSymbolIdField RecurseFlags
) {
150 if (S_OK
== (Symbol
->*Method
)(&Value
))
151 dumpSymbolIdField(OS
, Name
, Value
, Indent
, Session
, FieldId
, ShowFlags
,
155 template <typename ArgType
>
156 void DumpDIAValue(llvm::raw_ostream
&OS
, int Indent
, StringRef Name
,
158 HRESULT (__stdcall
IDiaSymbol::*Method
)(ArgType
*)) {
160 if (S_OK
== (Symbol
->*Method
)(&Value
))
161 dumpSymbolField(OS
, Name
, Value
, Indent
);
164 void DumpDIAValue(llvm::raw_ostream
&OS
, int Indent
, StringRef Name
,
166 HRESULT (__stdcall
IDiaSymbol::*Method
)(BSTR
*)) {
167 BSTR Value
= nullptr;
168 if (S_OK
!= (Symbol
->*Method
)(&Value
))
170 const char *Bytes
= reinterpret_cast<const char *>(Value
);
171 ArrayRef
<char> ByteArray(Bytes
, ::SysStringByteLen(Value
));
173 if (llvm::convertUTF16ToUTF8String(ByteArray
, Result
))
174 dumpSymbolField(OS
, Name
, Result
, Indent
);
175 ::SysFreeString(Value
);
178 void DumpDIAValue(llvm::raw_ostream
&OS
, int Indent
, StringRef Name
,
180 HRESULT (__stdcall
IDiaSymbol::*Method
)(VARIANT
*)) {
183 if (S_OK
!= (Symbol
->*Method
)(&Value
))
185 Variant V
= VariantFromVARIANT(Value
);
187 dumpSymbolField(OS
, Name
, V
, Indent
);
192 llvm::raw_ostream
&operator<<(llvm::raw_ostream
&OS
, const GUID
&G
) {
193 StringRef
GuidBytes(reinterpret_cast<const char *>(&G
), sizeof(G
));
194 codeview::detail::GuidAdapter
A(GuidBytes
);
200 DIARawSymbol::DIARawSymbol(const DIASession
&PDBSession
,
201 CComPtr
<IDiaSymbol
> DiaSymbol
)
202 : Session(PDBSession
), Symbol(DiaSymbol
) {}
204 #define RAW_ID_METHOD_DUMP(Stream, Method, Session, FieldId, ShowFlags, \
206 DumpDIAIdValue(Stream, Indent, StringRef{#Method}, Symbol, \
207 &IDiaSymbol::get_##Method, Session, FieldId, ShowFlags, \
210 #define RAW_METHOD_DUMP(Stream, Method) \
211 DumpDIAValue(Stream, Indent, StringRef{#Method}, Symbol, \
212 &IDiaSymbol::get_##Method);
214 #define RAW_METHOD_DUMP_AS(Stream, Method, Type) \
215 DumpDIAValueAs<Type>(Stream, Indent, StringRef{#Method}, Symbol, \
216 &IDiaSymbol::get_##Method);
218 void DIARawSymbol::dump(raw_ostream
&OS
, int Indent
,
219 PdbSymbolIdField ShowIdFields
,
220 PdbSymbolIdField RecurseIdFields
) const {
221 RAW_ID_METHOD_DUMP(OS
, symIndexId
, Session
, PdbSymbolIdField::SymIndexId
,
222 ShowIdFields
, RecurseIdFields
);
223 RAW_METHOD_DUMP_AS(OS
, symTag
, PDB_SymType
);
225 RAW_METHOD_DUMP(OS
, access
);
226 RAW_METHOD_DUMP(OS
, addressOffset
);
227 RAW_METHOD_DUMP(OS
, addressSection
);
228 RAW_METHOD_DUMP(OS
, age
);
229 RAW_METHOD_DUMP(OS
, arrayIndexTypeId
);
230 RAW_METHOD_DUMP(OS
, backEndMajor
);
231 RAW_METHOD_DUMP(OS
, backEndMinor
);
232 RAW_METHOD_DUMP(OS
, backEndBuild
);
233 RAW_METHOD_DUMP(OS
, backEndQFE
);
234 RAW_METHOD_DUMP(OS
, baseDataOffset
);
235 RAW_METHOD_DUMP(OS
, baseDataSlot
);
236 RAW_METHOD_DUMP(OS
, baseSymbolId
);
237 RAW_METHOD_DUMP_AS(OS
, baseType
, PDB_BuiltinType
);
238 RAW_METHOD_DUMP(OS
, bitPosition
);
239 RAW_METHOD_DUMP_AS(OS
, callingConvention
, PDB_CallingConv
);
240 RAW_ID_METHOD_DUMP(OS
, classParentId
, Session
, PdbSymbolIdField::ClassParent
,
241 ShowIdFields
, RecurseIdFields
);
242 RAW_METHOD_DUMP(OS
, compilerName
);
243 RAW_METHOD_DUMP(OS
, count
);
244 RAW_METHOD_DUMP(OS
, countLiveRanges
);
245 RAW_METHOD_DUMP(OS
, frontEndMajor
);
246 RAW_METHOD_DUMP(OS
, frontEndMinor
);
247 RAW_METHOD_DUMP(OS
, frontEndBuild
);
248 RAW_METHOD_DUMP(OS
, frontEndQFE
);
249 RAW_ID_METHOD_DUMP(OS
, lexicalParentId
, Session
,
250 PdbSymbolIdField::LexicalParent
, ShowIdFields
,
252 RAW_METHOD_DUMP(OS
, libraryName
);
253 RAW_METHOD_DUMP(OS
, liveRangeStartAddressOffset
);
254 RAW_METHOD_DUMP(OS
, liveRangeStartAddressSection
);
255 RAW_METHOD_DUMP(OS
, liveRangeStartRelativeVirtualAddress
);
256 RAW_METHOD_DUMP(OS
, localBasePointerRegisterId
);
257 RAW_METHOD_DUMP(OS
, lowerBoundId
);
258 RAW_METHOD_DUMP(OS
, memorySpaceKind
);
259 RAW_METHOD_DUMP(OS
, name
);
260 RAW_METHOD_DUMP(OS
, numberOfAcceleratorPointerTags
);
261 RAW_METHOD_DUMP(OS
, numberOfColumns
);
262 RAW_METHOD_DUMP(OS
, numberOfModifiers
);
263 RAW_METHOD_DUMP(OS
, numberOfRegisterIndices
);
264 RAW_METHOD_DUMP(OS
, numberOfRows
);
265 RAW_METHOD_DUMP(OS
, objectFileName
);
266 RAW_METHOD_DUMP(OS
, oemId
);
267 RAW_METHOD_DUMP(OS
, oemSymbolId
);
268 RAW_METHOD_DUMP(OS
, offsetInUdt
);
269 RAW_METHOD_DUMP(OS
, platform
);
270 RAW_METHOD_DUMP(OS
, rank
);
271 RAW_METHOD_DUMP(OS
, registerId
);
272 RAW_METHOD_DUMP(OS
, registerType
);
273 RAW_METHOD_DUMP(OS
, relativeVirtualAddress
);
274 RAW_METHOD_DUMP(OS
, samplerSlot
);
275 RAW_METHOD_DUMP(OS
, signature
);
276 RAW_METHOD_DUMP(OS
, sizeInUdt
);
277 RAW_METHOD_DUMP(OS
, slot
);
278 RAW_METHOD_DUMP(OS
, sourceFileName
);
279 RAW_METHOD_DUMP(OS
, stride
);
280 RAW_METHOD_DUMP(OS
, subTypeId
);
281 RAW_METHOD_DUMP(OS
, symbolsFileName
);
282 RAW_METHOD_DUMP(OS
, targetOffset
);
283 RAW_METHOD_DUMP(OS
, targetRelativeVirtualAddress
);
284 RAW_METHOD_DUMP(OS
, targetVirtualAddress
);
285 RAW_METHOD_DUMP(OS
, targetSection
);
286 RAW_METHOD_DUMP(OS
, textureSlot
);
287 RAW_METHOD_DUMP(OS
, timeStamp
);
288 RAW_METHOD_DUMP(OS
, token
);
289 RAW_ID_METHOD_DUMP(OS
, typeId
, Session
, PdbSymbolIdField::Type
, ShowIdFields
,
291 RAW_METHOD_DUMP(OS
, uavSlot
);
292 RAW_METHOD_DUMP(OS
, undecoratedName
);
293 RAW_ID_METHOD_DUMP(OS
, unmodifiedTypeId
, Session
,
294 PdbSymbolIdField::UnmodifiedType
, ShowIdFields
,
296 RAW_METHOD_DUMP(OS
, upperBoundId
);
297 RAW_METHOD_DUMP(OS
, virtualBaseDispIndex
);
298 RAW_METHOD_DUMP(OS
, virtualBaseOffset
);
299 RAW_METHOD_DUMP(OS
, virtualTableShapeId
);
300 RAW_METHOD_DUMP_AS(OS
, dataKind
, PDB_DataKind
);
301 RAW_METHOD_DUMP(OS
, guid
);
302 RAW_METHOD_DUMP(OS
, offset
);
303 RAW_METHOD_DUMP(OS
, thisAdjust
);
304 RAW_METHOD_DUMP(OS
, virtualBasePointerOffset
);
305 RAW_METHOD_DUMP_AS(OS
, locationType
, PDB_LocType
);
306 RAW_METHOD_DUMP(OS
, machineType
);
307 RAW_METHOD_DUMP(OS
, thunkOrdinal
);
308 RAW_METHOD_DUMP(OS
, length
);
309 RAW_METHOD_DUMP(OS
, liveRangeLength
);
310 RAW_METHOD_DUMP(OS
, virtualAddress
);
311 RAW_METHOD_DUMP_AS(OS
, udtKind
, PDB_UdtType
);
312 RAW_METHOD_DUMP(OS
, constructor
);
313 RAW_METHOD_DUMP(OS
, customCallingConvention
);
314 RAW_METHOD_DUMP(OS
, farReturn
);
315 RAW_METHOD_DUMP(OS
, code
);
316 RAW_METHOD_DUMP(OS
, compilerGenerated
);
317 RAW_METHOD_DUMP(OS
, constType
);
318 RAW_METHOD_DUMP(OS
, editAndContinueEnabled
);
319 RAW_METHOD_DUMP(OS
, function
);
320 RAW_METHOD_DUMP(OS
, stride
);
321 RAW_METHOD_DUMP(OS
, noStackOrdering
);
322 RAW_METHOD_DUMP(OS
, hasAlloca
);
323 RAW_METHOD_DUMP(OS
, hasAssignmentOperator
);
324 RAW_METHOD_DUMP(OS
, isCTypes
);
325 RAW_METHOD_DUMP(OS
, hasCastOperator
);
326 RAW_METHOD_DUMP(OS
, hasDebugInfo
);
327 RAW_METHOD_DUMP(OS
, hasEH
);
328 RAW_METHOD_DUMP(OS
, hasEHa
);
329 RAW_METHOD_DUMP(OS
, hasInlAsm
);
330 RAW_METHOD_DUMP(OS
, framePointerPresent
);
331 RAW_METHOD_DUMP(OS
, inlSpec
);
332 RAW_METHOD_DUMP(OS
, interruptReturn
);
333 RAW_METHOD_DUMP(OS
, hasLongJump
);
334 RAW_METHOD_DUMP(OS
, hasManagedCode
);
335 RAW_METHOD_DUMP(OS
, hasNestedTypes
);
336 RAW_METHOD_DUMP(OS
, noInline
);
337 RAW_METHOD_DUMP(OS
, noReturn
);
338 RAW_METHOD_DUMP(OS
, optimizedCodeDebugInfo
);
339 RAW_METHOD_DUMP(OS
, overloadedOperator
);
340 RAW_METHOD_DUMP(OS
, hasSEH
);
341 RAW_METHOD_DUMP(OS
, hasSecurityChecks
);
342 RAW_METHOD_DUMP(OS
, hasSetJump
);
343 RAW_METHOD_DUMP(OS
, strictGSCheck
);
344 RAW_METHOD_DUMP(OS
, isAcceleratorGroupSharedLocal
);
345 RAW_METHOD_DUMP(OS
, isAcceleratorPointerTagLiveRange
);
346 RAW_METHOD_DUMP(OS
, isAcceleratorStubFunction
);
347 RAW_METHOD_DUMP(OS
, isAggregated
);
348 RAW_METHOD_DUMP(OS
, intro
);
349 RAW_METHOD_DUMP(OS
, isCVTCIL
);
350 RAW_METHOD_DUMP(OS
, isConstructorVirtualBase
);
351 RAW_METHOD_DUMP(OS
, isCxxReturnUdt
);
352 RAW_METHOD_DUMP(OS
, isDataAligned
);
353 RAW_METHOD_DUMP(OS
, isHLSLData
);
354 RAW_METHOD_DUMP(OS
, isHotpatchable
);
355 RAW_METHOD_DUMP(OS
, indirectVirtualBaseClass
);
356 RAW_METHOD_DUMP(OS
, isInterfaceUdt
);
357 RAW_METHOD_DUMP(OS
, intrinsic
);
358 RAW_METHOD_DUMP(OS
, isLTCG
);
359 RAW_METHOD_DUMP(OS
, isLocationControlFlowDependent
);
360 RAW_METHOD_DUMP(OS
, isMSILNetmodule
);
361 RAW_METHOD_DUMP(OS
, isMatrixRowMajor
);
362 RAW_METHOD_DUMP(OS
, managed
);
363 RAW_METHOD_DUMP(OS
, msil
);
364 RAW_METHOD_DUMP(OS
, isMultipleInheritance
);
365 RAW_METHOD_DUMP(OS
, isNaked
);
366 RAW_METHOD_DUMP(OS
, nested
);
367 RAW_METHOD_DUMP(OS
, isOptimizedAway
);
368 RAW_METHOD_DUMP(OS
, packed
);
369 RAW_METHOD_DUMP(OS
, isPointerBasedOnSymbolValue
);
370 RAW_METHOD_DUMP(OS
, isPointerToDataMember
);
371 RAW_METHOD_DUMP(OS
, isPointerToMemberFunction
);
372 RAW_METHOD_DUMP(OS
, pure
);
373 RAW_METHOD_DUMP(OS
, RValueReference
);
374 RAW_METHOD_DUMP(OS
, isRefUdt
);
375 RAW_METHOD_DUMP(OS
, reference
);
376 RAW_METHOD_DUMP(OS
, restrictedType
);
377 RAW_METHOD_DUMP(OS
, isReturnValue
);
378 RAW_METHOD_DUMP(OS
, isSafeBuffers
);
379 RAW_METHOD_DUMP(OS
, scoped
);
380 RAW_METHOD_DUMP(OS
, isSdl
);
381 RAW_METHOD_DUMP(OS
, isSingleInheritance
);
382 RAW_METHOD_DUMP(OS
, isSplitted
);
383 RAW_METHOD_DUMP(OS
, isStatic
);
384 RAW_METHOD_DUMP(OS
, isStripped
);
385 RAW_METHOD_DUMP(OS
, unalignedType
);
386 RAW_METHOD_DUMP(OS
, notReached
);
387 RAW_METHOD_DUMP(OS
, isValueUdt
);
388 RAW_METHOD_DUMP(OS
, virtual);
389 RAW_METHOD_DUMP(OS
, virtualBaseClass
);
390 RAW_METHOD_DUMP(OS
, isVirtualInheritance
);
391 RAW_METHOD_DUMP(OS
, volatileType
);
392 RAW_METHOD_DUMP(OS
, wasInlined
);
393 RAW_METHOD_DUMP(OS
, unused
);
394 RAW_METHOD_DUMP(OS
, value
);
397 std::unique_ptr
<IPDBEnumSymbols
>
398 DIARawSymbol::findChildren(PDB_SymType Type
) const {
399 enum SymTagEnum EnumVal
= static_cast<enum SymTagEnum
>(Type
);
401 CComPtr
<IDiaEnumSymbols
> DiaEnumerator
;
403 Symbol
->findChildrenEx(EnumVal
, nullptr, nsNone
, &DiaEnumerator
)) {
404 if (S_OK
!= Symbol
->findChildren(EnumVal
, nullptr, nsNone
, &DiaEnumerator
))
408 return std::make_unique
<DIAEnumSymbols
>(Session
, DiaEnumerator
);
411 std::unique_ptr
<IPDBEnumSymbols
>
412 DIARawSymbol::findChildren(PDB_SymType Type
, StringRef Name
,
413 PDB_NameSearchFlags Flags
) const {
414 llvm::SmallVector
<UTF16
, 32> Name16
;
415 llvm::convertUTF8ToUTF16String(Name
, Name16
);
417 enum SymTagEnum EnumVal
= static_cast<enum SymTagEnum
>(Type
);
418 DWORD CompareFlags
= static_cast<DWORD
>(Flags
);
419 wchar_t *Name16Str
= reinterpret_cast<wchar_t *>(Name16
.data());
421 CComPtr
<IDiaEnumSymbols
> DiaEnumerator
;
423 Symbol
->findChildrenEx(EnumVal
, Name16Str
, CompareFlags
, &DiaEnumerator
))
426 return std::make_unique
<DIAEnumSymbols
>(Session
, DiaEnumerator
);
429 std::unique_ptr
<IPDBEnumSymbols
>
430 DIARawSymbol::findChildrenByAddr(PDB_SymType Type
, StringRef Name
,
431 PDB_NameSearchFlags Flags
, uint32_t Section
,
432 uint32_t Offset
) const {
433 llvm::SmallVector
<UTF16
, 32> Name16
;
434 llvm::convertUTF8ToUTF16String(Name
, Name16
);
436 enum SymTagEnum EnumVal
= static_cast<enum SymTagEnum
>(Type
);
438 DWORD CompareFlags
= static_cast<DWORD
>(Flags
);
439 wchar_t *Name16Str
= reinterpret_cast<wchar_t *>(Name16
.data());
441 CComPtr
<IDiaEnumSymbols
> DiaEnumerator
;
442 if (S_OK
!= Symbol
->findChildrenExByAddr(EnumVal
, Name16Str
, CompareFlags
,
443 Section
, Offset
, &DiaEnumerator
))
446 return std::make_unique
<DIAEnumSymbols
>(Session
, DiaEnumerator
);
449 std::unique_ptr
<IPDBEnumSymbols
>
450 DIARawSymbol::findChildrenByVA(PDB_SymType Type
, StringRef Name
,
451 PDB_NameSearchFlags Flags
, uint64_t VA
) const {
452 llvm::SmallVector
<UTF16
, 32> Name16
;
453 llvm::convertUTF8ToUTF16String(Name
, Name16
);
455 enum SymTagEnum EnumVal
= static_cast<enum SymTagEnum
>(Type
);
457 DWORD CompareFlags
= static_cast<DWORD
>(Flags
);
458 wchar_t *Name16Str
= reinterpret_cast<wchar_t *>(Name16
.data());
460 CComPtr
<IDiaEnumSymbols
> DiaEnumerator
;
461 if (S_OK
!= Symbol
->findChildrenExByVA(EnumVal
, Name16Str
, CompareFlags
, VA
,
465 return std::make_unique
<DIAEnumSymbols
>(Session
, DiaEnumerator
);
468 std::unique_ptr
<IPDBEnumSymbols
>
469 DIARawSymbol::findChildrenByRVA(PDB_SymType Type
, StringRef Name
,
470 PDB_NameSearchFlags Flags
, uint32_t RVA
) const {
471 llvm::SmallVector
<UTF16
, 32> Name16
;
472 llvm::convertUTF8ToUTF16String(Name
, Name16
);
474 enum SymTagEnum EnumVal
= static_cast<enum SymTagEnum
>(Type
);
475 DWORD CompareFlags
= static_cast<DWORD
>(Flags
);
476 wchar_t *Name16Str
= reinterpret_cast<wchar_t *>(Name16
.data());
478 CComPtr
<IDiaEnumSymbols
> DiaEnumerator
;
479 if (S_OK
!= Symbol
->findChildrenExByRVA(EnumVal
, Name16Str
, CompareFlags
, RVA
,
483 return std::make_unique
<DIAEnumSymbols
>(Session
, DiaEnumerator
);
486 std::unique_ptr
<IPDBEnumSymbols
>
487 DIARawSymbol::findInlineFramesByAddr(uint32_t Section
, uint32_t Offset
) const {
488 CComPtr
<IDiaEnumSymbols
> DiaEnumerator
;
489 if (S_OK
!= Symbol
->findInlineFramesByAddr(Section
, Offset
, &DiaEnumerator
))
492 return std::make_unique
<DIAEnumSymbols
>(Session
, DiaEnumerator
);
495 std::unique_ptr
<IPDBEnumSymbols
>
496 DIARawSymbol::findInlineFramesByRVA(uint32_t RVA
) const {
497 CComPtr
<IDiaEnumSymbols
> DiaEnumerator
;
498 if (S_OK
!= Symbol
->findInlineFramesByRVA(RVA
, &DiaEnumerator
))
501 return std::make_unique
<DIAEnumSymbols
>(Session
, DiaEnumerator
);
504 std::unique_ptr
<IPDBEnumSymbols
>
505 DIARawSymbol::findInlineFramesByVA(uint64_t VA
) const {
506 CComPtr
<IDiaEnumSymbols
> DiaEnumerator
;
507 if (S_OK
!= Symbol
->findInlineFramesByVA(VA
, &DiaEnumerator
))
510 return std::make_unique
<DIAEnumSymbols
>(Session
, DiaEnumerator
);
513 std::unique_ptr
<IPDBEnumLineNumbers
> DIARawSymbol::findInlineeLines() const {
514 CComPtr
<IDiaEnumLineNumbers
> DiaEnumerator
;
515 if (S_OK
!= Symbol
->findInlineeLines(&DiaEnumerator
))
518 return std::make_unique
<DIAEnumLineNumbers
>(DiaEnumerator
);
521 std::unique_ptr
<IPDBEnumLineNumbers
>
522 DIARawSymbol::findInlineeLinesByAddr(uint32_t Section
, uint32_t Offset
,
523 uint32_t Length
) const {
524 CComPtr
<IDiaEnumLineNumbers
> DiaEnumerator
;
526 Symbol
->findInlineeLinesByAddr(Section
, Offset
, Length
, &DiaEnumerator
))
529 return std::make_unique
<DIAEnumLineNumbers
>(DiaEnumerator
);
532 std::unique_ptr
<IPDBEnumLineNumbers
>
533 DIARawSymbol::findInlineeLinesByRVA(uint32_t RVA
, uint32_t Length
) const {
534 CComPtr
<IDiaEnumLineNumbers
> DiaEnumerator
;
535 if (S_OK
!= Symbol
->findInlineeLinesByRVA(RVA
, Length
, &DiaEnumerator
))
538 return std::make_unique
<DIAEnumLineNumbers
>(DiaEnumerator
);
541 std::unique_ptr
<IPDBEnumLineNumbers
>
542 DIARawSymbol::findInlineeLinesByVA(uint64_t VA
, uint32_t Length
) const {
543 CComPtr
<IDiaEnumLineNumbers
> DiaEnumerator
;
544 if (S_OK
!= Symbol
->findInlineeLinesByVA(VA
, Length
, &DiaEnumerator
))
547 return std::make_unique
<DIAEnumLineNumbers
>(DiaEnumerator
);
550 void DIARawSymbol::getDataBytes(llvm::SmallVector
<uint8_t, 32> &bytes
) const {
554 Symbol
->get_dataBytes(0, &DataSize
, nullptr);
558 bytes
.resize(DataSize
);
559 Symbol
->get_dataBytes(DataSize
, &DataSize
, bytes
.data());
562 std::string
DIARawSymbol::getUndecoratedNameEx(PDB_UndnameFlags Flags
) const {
564 if (S_OK
!= Symbol
->get_undecoratedNameEx((DWORD
)Flags
, &Result16
))
565 return std::string();
567 const char *SrcBytes
= reinterpret_cast<const char *>(Result16
.m_str
);
568 llvm::ArrayRef
<char> SrcByteArray(SrcBytes
, Result16
.ByteLength());
570 if (!llvm::convertUTF16ToUTF8String(SrcByteArray
, Result8
))
571 return std::string();
575 PDB_MemberAccess
DIARawSymbol::getAccess() const {
576 return PrivateGetDIAValue
<DWORD
, PDB_MemberAccess
>(Symbol
,
577 &IDiaSymbol::get_access
);
580 uint32_t DIARawSymbol::getAddressOffset() const {
581 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_addressOffset
);
584 uint32_t DIARawSymbol::getAddressSection() const {
585 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_addressSection
);
588 uint32_t DIARawSymbol::getAge() const {
589 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_age
);
592 SymIndexId
DIARawSymbol::getArrayIndexTypeId() const {
593 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_arrayIndexTypeId
);
596 void DIARawSymbol::getBackEndVersion(VersionInfo
&Version
) const {
597 Version
.Major
= PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_backEndMajor
);
598 Version
.Minor
= PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_backEndMinor
);
599 Version
.Build
= PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_backEndBuild
);
600 Version
.QFE
= PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_backEndQFE
);
603 uint32_t DIARawSymbol::getBaseDataOffset() const {
604 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_baseDataOffset
);
607 uint32_t DIARawSymbol::getBaseDataSlot() const {
608 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_baseDataSlot
);
611 SymIndexId
DIARawSymbol::getBaseSymbolId() const {
612 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_baseSymbolId
);
615 PDB_BuiltinType
DIARawSymbol::getBuiltinType() const {
616 return PrivateGetDIAValue
<DWORD
, PDB_BuiltinType
>(Symbol
,
617 &IDiaSymbol::get_baseType
);
620 uint32_t DIARawSymbol::getBitPosition() const {
621 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_bitPosition
);
624 PDB_CallingConv
DIARawSymbol::getCallingConvention() const {
625 return PrivateGetDIAValue
<DWORD
, PDB_CallingConv
>(
626 Symbol
, &IDiaSymbol::get_callingConvention
);
629 SymIndexId
DIARawSymbol::getClassParentId() const {
630 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_classParentId
);
633 std::string
DIARawSymbol::getCompilerName() const {
634 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_compilerName
);
637 uint32_t DIARawSymbol::getCount() const {
638 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_count
);
641 uint32_t DIARawSymbol::getCountLiveRanges() const {
642 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_countLiveRanges
);
645 void DIARawSymbol::getFrontEndVersion(VersionInfo
&Version
) const {
646 Version
.Major
= PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_frontEndMajor
);
647 Version
.Minor
= PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_frontEndMinor
);
648 Version
.Build
= PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_frontEndBuild
);
649 Version
.QFE
= PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_frontEndQFE
);
652 PDB_Lang
DIARawSymbol::getLanguage() const {
653 return PrivateGetDIAValue
<DWORD
, PDB_Lang
>(Symbol
, &IDiaSymbol::get_language
);
656 SymIndexId
DIARawSymbol::getLexicalParentId() const {
657 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_lexicalParentId
);
660 std::string
DIARawSymbol::getLibraryName() const {
661 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_libraryName
);
664 uint32_t DIARawSymbol::getLiveRangeStartAddressOffset() const {
665 return PrivateGetDIAValue(Symbol
,
666 &IDiaSymbol::get_liveRangeStartAddressOffset
);
669 uint32_t DIARawSymbol::getLiveRangeStartAddressSection() const {
670 return PrivateGetDIAValue(Symbol
,
671 &IDiaSymbol::get_liveRangeStartAddressSection
);
674 uint32_t DIARawSymbol::getLiveRangeStartRelativeVirtualAddress() const {
675 return PrivateGetDIAValue(
676 Symbol
, &IDiaSymbol::get_liveRangeStartRelativeVirtualAddress
);
679 codeview::RegisterId
DIARawSymbol::getLocalBasePointerRegisterId() const {
680 return PrivateGetDIAValue
<DWORD
, codeview::RegisterId
>(
681 Symbol
, &IDiaSymbol::get_localBasePointerRegisterId
);
684 SymIndexId
DIARawSymbol::getLowerBoundId() const {
685 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_lowerBoundId
);
688 uint32_t DIARawSymbol::getMemorySpaceKind() const {
689 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_memorySpaceKind
);
692 std::string
DIARawSymbol::getName() const {
693 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_name
);
696 uint32_t DIARawSymbol::getNumberOfAcceleratorPointerTags() const {
697 return PrivateGetDIAValue(Symbol
,
698 &IDiaSymbol::get_numberOfAcceleratorPointerTags
);
701 uint32_t DIARawSymbol::getNumberOfColumns() const {
702 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_numberOfColumns
);
705 uint32_t DIARawSymbol::getNumberOfModifiers() const {
706 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_numberOfModifiers
);
709 uint32_t DIARawSymbol::getNumberOfRegisterIndices() const {
710 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_numberOfRegisterIndices
);
713 uint32_t DIARawSymbol::getNumberOfRows() const {
714 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_numberOfRows
);
717 std::string
DIARawSymbol::getObjectFileName() const {
718 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_objectFileName
);
721 uint32_t DIARawSymbol::getOemId() const {
722 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_oemId
);
725 SymIndexId
DIARawSymbol::getOemSymbolId() const {
726 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_oemSymbolId
);
729 uint32_t DIARawSymbol::getOffsetInUdt() const {
730 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_offsetInUdt
);
733 PDB_Cpu
DIARawSymbol::getPlatform() const {
734 return PrivateGetDIAValue
<DWORD
, PDB_Cpu
>(Symbol
, &IDiaSymbol::get_platform
);
737 uint32_t DIARawSymbol::getRank() const {
738 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_rank
);
741 codeview::RegisterId
DIARawSymbol::getRegisterId() const {
742 return PrivateGetDIAValue
<DWORD
, codeview::RegisterId
>(
743 Symbol
, &IDiaSymbol::get_registerId
);
746 uint32_t DIARawSymbol::getRegisterType() const {
747 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_registerType
);
750 uint32_t DIARawSymbol::getRelativeVirtualAddress() const {
751 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_relativeVirtualAddress
);
754 uint32_t DIARawSymbol::getSamplerSlot() const {
755 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_samplerSlot
);
758 uint32_t DIARawSymbol::getSignature() const {
759 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_signature
);
762 uint32_t DIARawSymbol::getSizeInUdt() const {
763 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_sizeInUdt
);
766 uint32_t DIARawSymbol::getSlot() const {
767 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_slot
);
770 std::string
DIARawSymbol::getSourceFileName() const {
771 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_sourceFileName
);
774 std::unique_ptr
<IPDBLineNumber
> DIARawSymbol::getSrcLineOnTypeDefn() const {
775 CComPtr
<IDiaLineNumber
> LineNumber
;
776 if (FAILED(Symbol
->getSrcLineOnTypeDefn(&LineNumber
)) || !LineNumber
)
779 return std::make_unique
<DIALineNumber
>(LineNumber
);
782 uint32_t DIARawSymbol::getStride() const {
783 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_stride
);
786 SymIndexId
DIARawSymbol::getSubTypeId() const {
787 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_subTypeId
);
790 std::string
DIARawSymbol::getSymbolsFileName() const {
791 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_symbolsFileName
);
794 SymIndexId
DIARawSymbol::getSymIndexId() const {
795 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_symIndexId
);
798 uint32_t DIARawSymbol::getTargetOffset() const {
799 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_targetOffset
);
802 uint32_t DIARawSymbol::getTargetRelativeVirtualAddress() const {
803 return PrivateGetDIAValue(Symbol
,
804 &IDiaSymbol::get_targetRelativeVirtualAddress
);
807 uint64_t DIARawSymbol::getTargetVirtualAddress() const {
808 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_targetVirtualAddress
);
811 uint32_t DIARawSymbol::getTargetSection() const {
812 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_targetSection
);
815 uint32_t DIARawSymbol::getTextureSlot() const {
816 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_textureSlot
);
819 uint32_t DIARawSymbol::getTimeStamp() const {
820 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_timeStamp
);
823 uint32_t DIARawSymbol::getToken() const {
824 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_token
);
827 SymIndexId
DIARawSymbol::getTypeId() const {
828 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_typeId
);
831 uint32_t DIARawSymbol::getUavSlot() const {
832 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_uavSlot
);
835 std::string
DIARawSymbol::getUndecoratedName() const {
836 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_undecoratedName
);
839 SymIndexId
DIARawSymbol::getUnmodifiedTypeId() const {
840 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_unmodifiedTypeId
);
843 SymIndexId
DIARawSymbol::getUpperBoundId() const {
844 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_upperBoundId
);
847 Variant
DIARawSymbol::getValue() const {
850 if (S_OK
!= Symbol
->get_value(&Value
))
853 return VariantFromVARIANT(Value
);
856 uint32_t DIARawSymbol::getVirtualBaseDispIndex() const {
857 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_virtualBaseDispIndex
);
860 uint32_t DIARawSymbol::getVirtualBaseOffset() const {
861 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_virtualBaseOffset
);
864 SymIndexId
DIARawSymbol::getVirtualTableShapeId() const {
865 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_virtualTableShapeId
);
868 std::unique_ptr
<PDBSymbolTypeBuiltin
>
869 DIARawSymbol::getVirtualBaseTableType() const {
870 CComPtr
<IDiaSymbol
> TableType
;
871 if (FAILED(Symbol
->get_virtualBaseTableType(&TableType
)) || !TableType
)
874 auto RawVT
= std::make_unique
<DIARawSymbol
>(Session
, TableType
);
876 PDBSymbol::createAs
<PDBSymbolTypePointer
>(Session
, std::move(RawVT
));
877 return unique_dyn_cast
<PDBSymbolTypeBuiltin
>(Pointer
->getPointeeType());
880 PDB_DataKind
DIARawSymbol::getDataKind() const {
881 return PrivateGetDIAValue
<DWORD
, PDB_DataKind
>(Symbol
,
882 &IDiaSymbol::get_dataKind
);
885 PDB_SymType
DIARawSymbol::getSymTag() const {
886 return PrivateGetDIAValue
<DWORD
, PDB_SymType
>(Symbol
,
887 &IDiaSymbol::get_symTag
);
890 codeview::GUID
DIARawSymbol::getGuid() const {
891 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_guid
);
894 int32_t DIARawSymbol::getOffset() const {
895 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_offset
);
898 int32_t DIARawSymbol::getThisAdjust() const {
899 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_thisAdjust
);
902 int32_t DIARawSymbol::getVirtualBasePointerOffset() const {
903 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_virtualBasePointerOffset
);
906 PDB_LocType
DIARawSymbol::getLocationType() const {
907 return PrivateGetDIAValue
<DWORD
, PDB_LocType
>(Symbol
,
908 &IDiaSymbol::get_locationType
);
911 PDB_Machine
DIARawSymbol::getMachineType() const {
912 return PrivateGetDIAValue
<DWORD
, PDB_Machine
>(Symbol
,
913 &IDiaSymbol::get_machineType
);
916 codeview::ThunkOrdinal
DIARawSymbol::getThunkOrdinal() const {
917 return PrivateGetDIAValue
<DWORD
, codeview::ThunkOrdinal
>(
918 Symbol
, &IDiaSymbol::get_thunkOrdinal
);
921 uint64_t DIARawSymbol::getLength() const {
922 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_length
);
925 uint64_t DIARawSymbol::getLiveRangeLength() const {
926 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_liveRangeLength
);
929 uint64_t DIARawSymbol::getVirtualAddress() const {
930 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_virtualAddress
);
933 PDB_UdtType
DIARawSymbol::getUdtKind() const {
934 return PrivateGetDIAValue
<DWORD
, PDB_UdtType
>(Symbol
,
935 &IDiaSymbol::get_udtKind
);
938 bool DIARawSymbol::hasConstructor() const {
939 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_constructor
);
942 bool DIARawSymbol::hasCustomCallingConvention() const {
943 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_customCallingConvention
);
946 bool DIARawSymbol::hasFarReturn() const {
947 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_farReturn
);
950 bool DIARawSymbol::isCode() const {
951 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_code
);
954 bool DIARawSymbol::isCompilerGenerated() const {
955 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_compilerGenerated
);
958 bool DIARawSymbol::isConstType() const {
959 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_constType
);
962 bool DIARawSymbol::isEditAndContinueEnabled() const {
963 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_editAndContinueEnabled
);
966 bool DIARawSymbol::isFunction() const {
967 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_function
);
970 bool DIARawSymbol::getAddressTaken() const {
971 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_addressTaken
);
974 bool DIARawSymbol::getNoStackOrdering() const {
975 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_noStackOrdering
);
978 bool DIARawSymbol::hasAlloca() const {
979 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_hasAlloca
);
982 bool DIARawSymbol::hasAssignmentOperator() const {
983 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_hasAssignmentOperator
);
986 bool DIARawSymbol::hasCTypes() const {
987 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_isCTypes
);
990 bool DIARawSymbol::hasCastOperator() const {
991 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_hasCastOperator
);
994 bool DIARawSymbol::hasDebugInfo() const {
995 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_hasDebugInfo
);
998 bool DIARawSymbol::hasEH() const {
999 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_hasEH
);
1002 bool DIARawSymbol::hasEHa() const {
1003 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_hasEHa
);
1006 bool DIARawSymbol::hasInlAsm() const {
1007 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_hasInlAsm
);
1010 bool DIARawSymbol::hasInlineAttribute() const {
1011 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_inlSpec
);
1014 bool DIARawSymbol::hasInterruptReturn() const {
1015 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_interruptReturn
);
1018 bool DIARawSymbol::hasFramePointer() const {
1019 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_framePointerPresent
);
1022 bool DIARawSymbol::hasLongJump() const {
1023 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_hasLongJump
);
1026 bool DIARawSymbol::hasManagedCode() const {
1027 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_hasManagedCode
);
1030 bool DIARawSymbol::hasNestedTypes() const {
1031 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_hasNestedTypes
);
1034 bool DIARawSymbol::hasNoInlineAttribute() const {
1035 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_noInline
);
1038 bool DIARawSymbol::hasNoReturnAttribute() const {
1039 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_noReturn
);
1042 bool DIARawSymbol::hasOptimizedCodeDebugInfo() const {
1043 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_optimizedCodeDebugInfo
);
1046 bool DIARawSymbol::hasOverloadedOperator() const {
1047 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_overloadedOperator
);
1050 bool DIARawSymbol::hasSEH() const {
1051 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_hasSEH
);
1054 bool DIARawSymbol::hasSecurityChecks() const {
1055 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_hasSecurityChecks
);
1058 bool DIARawSymbol::hasSetJump() const {
1059 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_hasSetJump
);
1062 bool DIARawSymbol::hasStrictGSCheck() const {
1063 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_strictGSCheck
);
1066 bool DIARawSymbol::isAcceleratorGroupSharedLocal() const {
1067 return PrivateGetDIAValue(Symbol
,
1068 &IDiaSymbol::get_isAcceleratorGroupSharedLocal
);
1071 bool DIARawSymbol::isAcceleratorPointerTagLiveRange() const {
1072 return PrivateGetDIAValue(Symbol
,
1073 &IDiaSymbol::get_isAcceleratorPointerTagLiveRange
);
1076 bool DIARawSymbol::isAcceleratorStubFunction() const {
1077 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_isAcceleratorStubFunction
);
1080 bool DIARawSymbol::isAggregated() const {
1081 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_isAggregated
);
1084 bool DIARawSymbol::isIntroVirtualFunction() const {
1085 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_intro
);
1088 bool DIARawSymbol::isCVTCIL() const {
1089 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_isCVTCIL
);
1092 bool DIARawSymbol::isConstructorVirtualBase() const {
1093 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_isConstructorVirtualBase
);
1096 bool DIARawSymbol::isCxxReturnUdt() const {
1097 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_isCxxReturnUdt
);
1100 bool DIARawSymbol::isDataAligned() const {
1101 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_isDataAligned
);
1104 bool DIARawSymbol::isHLSLData() const {
1105 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_isHLSLData
);
1108 bool DIARawSymbol::isHotpatchable() const {
1109 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_isHotpatchable
);
1112 bool DIARawSymbol::isIndirectVirtualBaseClass() const {
1113 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_indirectVirtualBaseClass
);
1116 bool DIARawSymbol::isInterfaceUdt() const {
1117 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_isInterfaceUdt
);
1120 bool DIARawSymbol::isIntrinsic() const {
1121 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_intrinsic
);
1124 bool DIARawSymbol::isLTCG() const {
1125 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_isLTCG
);
1128 bool DIARawSymbol::isLocationControlFlowDependent() const {
1129 return PrivateGetDIAValue(Symbol
,
1130 &IDiaSymbol::get_isLocationControlFlowDependent
);
1133 bool DIARawSymbol::isMSILNetmodule() const {
1134 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_isMSILNetmodule
);
1137 bool DIARawSymbol::isMatrixRowMajor() const {
1138 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_isMatrixRowMajor
);
1141 bool DIARawSymbol::isManagedCode() const {
1142 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_managed
);
1145 bool DIARawSymbol::isMSILCode() const {
1146 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_msil
);
1149 bool DIARawSymbol::isMultipleInheritance() const {
1150 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_isMultipleInheritance
);
1153 bool DIARawSymbol::isNaked() const {
1154 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_isNaked
);
1157 bool DIARawSymbol::isNested() const {
1158 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_nested
);
1161 bool DIARawSymbol::isOptimizedAway() const {
1162 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_isOptimizedAway
);
1165 bool DIARawSymbol::isPacked() const {
1166 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_packed
);
1169 bool DIARawSymbol::isPointerBasedOnSymbolValue() const {
1170 return PrivateGetDIAValue(Symbol
,
1171 &IDiaSymbol::get_isPointerBasedOnSymbolValue
);
1174 bool DIARawSymbol::isPointerToDataMember() const {
1175 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_isPointerToDataMember
);
1178 bool DIARawSymbol::isPointerToMemberFunction() const {
1179 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_isPointerToMemberFunction
);
1182 bool DIARawSymbol::isPureVirtual() const {
1183 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_pure
);
1186 bool DIARawSymbol::isRValueReference() const {
1187 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_RValueReference
);
1190 bool DIARawSymbol::isRefUdt() const {
1191 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_isRefUdt
);
1194 bool DIARawSymbol::isReference() const {
1195 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_reference
);
1198 bool DIARawSymbol::isRestrictedType() const {
1199 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_restrictedType
);
1202 bool DIARawSymbol::isReturnValue() const {
1203 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_isReturnValue
);
1206 bool DIARawSymbol::isSafeBuffers() const {
1207 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_isSafeBuffers
);
1210 bool DIARawSymbol::isScoped() const {
1211 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_scoped
);
1214 bool DIARawSymbol::isSdl() const {
1215 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_isSdl
);
1218 bool DIARawSymbol::isSingleInheritance() const {
1219 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_isSingleInheritance
);
1222 bool DIARawSymbol::isSplitted() const {
1223 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_isSplitted
);
1226 bool DIARawSymbol::isStatic() const {
1227 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_isStatic
);
1230 bool DIARawSymbol::hasPrivateSymbols() const {
1231 // hasPrivateSymbols is the opposite of isStripped, but we expose
1232 // hasPrivateSymbols as a more intuitive interface.
1233 return !PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_isStripped
);
1236 bool DIARawSymbol::isUnalignedType() const {
1237 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_unalignedType
);
1240 bool DIARawSymbol::isUnreached() const {
1241 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_notReached
);
1244 bool DIARawSymbol::isValueUdt() const {
1245 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_isValueUdt
);
1248 bool DIARawSymbol::isVirtual() const {
1249 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_virtual
);
1252 bool DIARawSymbol::isVirtualBaseClass() const {
1253 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_virtualBaseClass
);
1256 bool DIARawSymbol::isVirtualInheritance() const {
1257 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_isVirtualInheritance
);
1260 bool DIARawSymbol::isVolatileType() const {
1261 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_volatileType
);
1264 bool DIARawSymbol::wasInlined() const {
1265 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_wasInlined
);
1268 std::string
DIARawSymbol::getUnused() const {
1269 return PrivateGetDIAValue(Symbol
, &IDiaSymbol::get_unused
);