LLVM 20.0.0git
DIARawSymbol.cpp
Go to the documentation of this file.
1//===- DIARawSymbol.cpp - DIA implementation of IPDBRawSymbol ---*- C++ -*-===//
2//
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
6//
7//===----------------------------------------------------------------------===//
8
10#include "llvm/ADT/ArrayRef.h"
11#include "llvm/ADT/STLExtras.h"
25
26using namespace llvm;
27using namespace llvm::pdb;
28
29namespace {
30Variant VariantFromVARIANT(const VARIANT &V) {
32 switch (V.vt) {
33 case VT_I1:
34 Result.Value.Int8 = V.cVal;
35 Result.Type = PDB_VariantType::Int8;
36 break;
37 case VT_I2:
38 Result.Value.Int16 = V.iVal;
39 Result.Type = PDB_VariantType::Int16;
40 break;
41 case VT_I4:
42 Result.Value.Int32 = V.intVal;
43 Result.Type = PDB_VariantType::Int32;
44 break;
45 case VT_I8:
46 Result.Value.Int64 = V.llVal;
47 Result.Type = PDB_VariantType::Int64;
48 break;
49 case VT_UI1:
50 Result.Value.UInt8 = V.bVal;
51 Result.Type = PDB_VariantType::UInt8;
52 break;
53 case VT_UI2:
54 Result.Value.UInt16 = V.uiVal;
55 Result.Type = PDB_VariantType::UInt16;
56 break;
57 case VT_UI4:
58 Result.Value.UInt32 = V.uintVal;
59 Result.Type = PDB_VariantType::UInt32;
60 break;
61 case VT_UI8:
62 Result.Value.UInt64 = V.ullVal;
63 Result.Type = PDB_VariantType::UInt64;
64 break;
65 case VT_BOOL:
66 Result.Value.Bool = (V.boolVal == VARIANT_TRUE) ? true : false;
67 Result.Type = PDB_VariantType::Bool;
68 break;
69 case VT_R4:
70 Result.Value.Single = V.fltVal;
71 Result.Type = PDB_VariantType::Single;
72 break;
73 case VT_R8:
74 Result.Value.Double = V.dblVal;
75 Result.Type = PDB_VariantType::Double;
76 break;
77 case VT_BSTR: {
78 const char *SrcBytes = reinterpret_cast<const char *>(V.bstrVal);
79 llvm::ArrayRef<char> SrcByteArray(SrcBytes, SysStringByteLen(V.bstrVal));
80 std::string Result8;
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;
86 break;
87 }
88 default:
89 Result.Type = PDB_VariantType::Unknown;
90 break;
91 }
92 return Result;
93}
94
95template <typename ArgType>
96ArgType PrivateGetDIAValue(IDiaSymbol *Symbol,
97 HRESULT (__stdcall IDiaSymbol::*Method)(ArgType *)) {
98 ArgType Value;
99 if (S_OK == (Symbol->*Method)(&Value))
100 return static_cast<ArgType>(Value);
101
102 return ArgType();
103}
104
105template <typename ArgType, typename RetType>
106RetType PrivateGetDIAValue(IDiaSymbol *Symbol,
107 HRESULT (__stdcall IDiaSymbol::*Method)(ArgType *)) {
108 ArgType Value;
109 if (S_OK == (Symbol->*Method)(&Value))
110 return static_cast<RetType>(Value);
111
112 return RetType();
113}
114
115std::string
116PrivateGetDIAValue(IDiaSymbol *Symbol,
117 HRESULT (__stdcall IDiaSymbol::*Method)(BSTR *)) {
118 return invokeBstrMethod(*Symbol, Method);
119}
120
122PrivateGetDIAValue(IDiaSymbol *Symbol,
123 HRESULT (__stdcall IDiaSymbol::*Method)(GUID *)) {
124 GUID Result;
125 if (S_OK != (Symbol->*Method)(&Result))
126 return codeview::GUID();
127
128 static_assert(sizeof(codeview::GUID) == sizeof(GUID),
129 "GUID is the wrong size!");
130 codeview::GUID IdResult;
131 ::memcpy(&IdResult, &Result, sizeof(GUID));
132 return IdResult;
133}
134
135template <typename PrintType, typename ArgType>
136void DumpDIAValueAs(llvm::raw_ostream &OS, int Indent, StringRef Name,
137 IDiaSymbol *Symbol,
138 HRESULT (__stdcall IDiaSymbol::*Method)(ArgType *)) {
139 ArgType Value;
140 if (S_OK == (Symbol->*Method)(&Value))
141 dumpSymbolField(OS, Name, static_cast<PrintType>(Value), Indent);
142}
143
144void DumpDIAIdValue(llvm::raw_ostream &OS, int Indent, StringRef Name,
145 IDiaSymbol *Symbol,
146 HRESULT (__stdcall IDiaSymbol::*Method)(DWORD *),
147 const IPDBSession &Session, PdbSymbolIdField FieldId,
148 PdbSymbolIdField ShowFlags, PdbSymbolIdField RecurseFlags) {
149 DWORD Value;
150 if (S_OK == (Symbol->*Method)(&Value))
151 dumpSymbolIdField(OS, Name, Value, Indent, Session, FieldId, ShowFlags,
152 RecurseFlags);
153}
154
155template <typename ArgType>
156void DumpDIAValue(llvm::raw_ostream &OS, int Indent, StringRef Name,
157 IDiaSymbol *Symbol,
158 HRESULT (__stdcall IDiaSymbol::*Method)(ArgType *)) {
159 ArgType Value;
160 if (S_OK == (Symbol->*Method)(&Value))
161 dumpSymbolField(OS, Name, Value, Indent);
162}
163
164void DumpDIAValue(llvm::raw_ostream &OS, int Indent, StringRef Name,
165 IDiaSymbol *Symbol,
166 HRESULT (__stdcall IDiaSymbol::*Method)(BSTR *)) {
167 BSTR Value = nullptr;
168 if (S_OK != (Symbol->*Method)(&Value))
169 return;
170 const char *Bytes = reinterpret_cast<const char *>(Value);
171 ArrayRef<char> ByteArray(Bytes, ::SysStringByteLen(Value));
172 std::string Result;
173 if (llvm::convertUTF16ToUTF8String(ByteArray, Result))
174 dumpSymbolField(OS, Name, Result, Indent);
175 ::SysFreeString(Value);
176}
177
178void DumpDIAValue(llvm::raw_ostream &OS, int Indent, StringRef Name,
179 IDiaSymbol *Symbol,
180 HRESULT (__stdcall IDiaSymbol::*Method)(VARIANT *)) {
181 VARIANT Value;
182 Value.vt = VT_EMPTY;
183 if (S_OK != (Symbol->*Method)(&Value))
184 return;
185 Variant V = VariantFromVARIANT(Value);
186
187 dumpSymbolField(OS, Name, V, Indent);
188}
189} // namespace
190
191namespace llvm {
193 StringRef GuidBytes(reinterpret_cast<const char *>(&G), sizeof(G));
195 A.format(OS, "");
196 return OS;
197}
198} // namespace llvm
199
201 CComPtr<IDiaSymbol> DiaSymbol)
202 : Session(PDBSession), Symbol(DiaSymbol) {}
203
204#define RAW_ID_METHOD_DUMP(Stream, Method, Session, FieldId, ShowFlags, \
205 RecurseFlags) \
206 DumpDIAIdValue(Stream, Indent, StringRef{#Method}, Symbol, \
207 &IDiaSymbol::get_##Method, Session, FieldId, ShowFlags, \
208 RecurseFlags);
209
210#define RAW_METHOD_DUMP(Stream, Method) \
211 DumpDIAValue(Stream, Indent, StringRef{#Method}, Symbol, \
212 &IDiaSymbol::get_##Method);
213
214#define RAW_METHOD_DUMP_AS(Stream, Method, Type) \
215 DumpDIAValueAs<Type>(Stream, Indent, StringRef{#Method}, Symbol, \
216 &IDiaSymbol::get_##Method);
217
219 PdbSymbolIdField ShowIdFields,
220 PdbSymbolIdField RecurseIdFields) const {
222 ShowIdFields, RecurseIdFields);
224
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);
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);
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,
251 RecurseIdFields);
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);
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);
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,
290 RecurseIdFields);
291 RAW_METHOD_DUMP(OS, uavSlot);
292 RAW_METHOD_DUMP(OS, undecoratedName);
293 RAW_ID_METHOD_DUMP(OS, unmodifiedTypeId, Session,
295 RecurseIdFields);
296 RAW_METHOD_DUMP(OS, upperBoundId);
297 RAW_METHOD_DUMP(OS, virtualBaseDispIndex);
298 RAW_METHOD_DUMP(OS, virtualBaseOffset);
299 RAW_METHOD_DUMP(OS, virtualTableShapeId);
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);
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);
320 RAW_METHOD_DUMP(OS, stride);
321 RAW_METHOD_DUMP(OS, noStackOrdering);
324 RAW_METHOD_DUMP(OS, isCTypes);
330 RAW_METHOD_DUMP(OS, framePointerPresent);
331 RAW_METHOD_DUMP(OS, inlSpec);
332 RAW_METHOD_DUMP(OS, interruptReturn);
336 RAW_METHOD_DUMP(OS, noInline);
337 RAW_METHOD_DUMP(OS, noReturn);
338 RAW_METHOD_DUMP(OS, optimizedCodeDebugInfo);
339 RAW_METHOD_DUMP(OS, overloadedOperator);
343 RAW_METHOD_DUMP(OS, strictGSCheck);
348 RAW_METHOD_DUMP(OS, intro);
355 RAW_METHOD_DUMP(OS, indirectVirtualBaseClass);
357 RAW_METHOD_DUMP(OS, intrinsic);
362 RAW_METHOD_DUMP(OS, managed);
363 RAW_METHOD_DUMP(OS, msil);
366 RAW_METHOD_DUMP(OS, nested);
368 RAW_METHOD_DUMP(OS, packed);
372 RAW_METHOD_DUMP(OS, pure);
373 RAW_METHOD_DUMP(OS, RValueReference);
375 RAW_METHOD_DUMP(OS, reference);
376 RAW_METHOD_DUMP(OS, restrictedType);
379 RAW_METHOD_DUMP(OS, scoped);
384 RAW_METHOD_DUMP(OS, isStripped);
385 RAW_METHOD_DUMP(OS, unalignedType);
386 RAW_METHOD_DUMP(OS, notReached);
388 RAW_METHOD_DUMP(OS, virtual);
389 RAW_METHOD_DUMP(OS, virtualBaseClass);
391 RAW_METHOD_DUMP(OS, volatileType);
393 RAW_METHOD_DUMP(OS, unused);
395}
396
397std::unique_ptr<IPDBEnumSymbols>
399 enum SymTagEnum EnumVal = static_cast<enum SymTagEnum>(Type);
400
401 CComPtr<IDiaEnumSymbols> DiaEnumerator;
402 if (S_OK !=
403 Symbol->findChildrenEx(EnumVal, nullptr, nsNone, &DiaEnumerator)) {
404 if (S_OK != Symbol->findChildren(EnumVal, nullptr, nsNone, &DiaEnumerator))
405 return nullptr;
406 }
407
408 return std::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
409}
410
411std::unique_ptr<IPDBEnumSymbols>
413 PDB_NameSearchFlags Flags) const {
416
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());
420
421 CComPtr<IDiaEnumSymbols> DiaEnumerator;
422 if (S_OK !=
423 Symbol->findChildrenEx(EnumVal, Name16Str, CompareFlags, &DiaEnumerator))
424 return nullptr;
425
426 return std::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
427}
428
429std::unique_ptr<IPDBEnumSymbols>
431 PDB_NameSearchFlags Flags, uint32_t Section,
432 uint32_t Offset) const {
435
436 enum SymTagEnum EnumVal = static_cast<enum SymTagEnum>(Type);
437
438 DWORD CompareFlags = static_cast<DWORD>(Flags);
439 wchar_t *Name16Str = reinterpret_cast<wchar_t *>(Name16.data());
440
441 CComPtr<IDiaEnumSymbols> DiaEnumerator;
442 if (S_OK != Symbol->findChildrenExByAddr(EnumVal, Name16Str, CompareFlags,
443 Section, Offset, &DiaEnumerator))
444 return nullptr;
445
446 return std::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
447}
448
449std::unique_ptr<IPDBEnumSymbols>
451 PDB_NameSearchFlags Flags, uint64_t VA) const {
454
455 enum SymTagEnum EnumVal = static_cast<enum SymTagEnum>(Type);
456
457 DWORD CompareFlags = static_cast<DWORD>(Flags);
458 wchar_t *Name16Str = reinterpret_cast<wchar_t *>(Name16.data());
459
460 CComPtr<IDiaEnumSymbols> DiaEnumerator;
461 if (S_OK != Symbol->findChildrenExByVA(EnumVal, Name16Str, CompareFlags, VA,
462 &DiaEnumerator))
463 return nullptr;
464
465 return std::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
466}
467
468std::unique_ptr<IPDBEnumSymbols>
470 PDB_NameSearchFlags Flags, uint32_t RVA) const {
473
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());
477
478 CComPtr<IDiaEnumSymbols> DiaEnumerator;
479 if (S_OK != Symbol->findChildrenExByRVA(EnumVal, Name16Str, CompareFlags, RVA,
480 &DiaEnumerator))
481 return nullptr;
482
483 return std::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
484}
485
486std::unique_ptr<IPDBEnumSymbols>
488 CComPtr<IDiaEnumSymbols> DiaEnumerator;
489 if (S_OK != Symbol->findInlineFramesByAddr(Section, Offset, &DiaEnumerator))
490 return nullptr;
491
492 return std::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
493}
494
495std::unique_ptr<IPDBEnumSymbols>
497 CComPtr<IDiaEnumSymbols> DiaEnumerator;
498 if (S_OK != Symbol->findInlineFramesByRVA(RVA, &DiaEnumerator))
499 return nullptr;
500
501 return std::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
502}
503
504std::unique_ptr<IPDBEnumSymbols>
506 CComPtr<IDiaEnumSymbols> DiaEnumerator;
507 if (S_OK != Symbol->findInlineFramesByVA(VA, &DiaEnumerator))
508 return nullptr;
509
510 return std::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
511}
512
513std::unique_ptr<IPDBEnumLineNumbers> DIARawSymbol::findInlineeLines() const {
514 CComPtr<IDiaEnumLineNumbers> DiaEnumerator;
515 if (S_OK != Symbol->findInlineeLines(&DiaEnumerator))
516 return nullptr;
517
518 return std::make_unique<DIAEnumLineNumbers>(DiaEnumerator);
519}
520
521std::unique_ptr<IPDBEnumLineNumbers>
523 uint32_t Length) const {
524 CComPtr<IDiaEnumLineNumbers> DiaEnumerator;
525 if (S_OK !=
526 Symbol->findInlineeLinesByAddr(Section, Offset, Length, &DiaEnumerator))
527 return nullptr;
528
529 return std::make_unique<DIAEnumLineNumbers>(DiaEnumerator);
530}
531
532std::unique_ptr<IPDBEnumLineNumbers>
534 CComPtr<IDiaEnumLineNumbers> DiaEnumerator;
535 if (S_OK != Symbol->findInlineeLinesByRVA(RVA, Length, &DiaEnumerator))
536 return nullptr;
537
538 return std::make_unique<DIAEnumLineNumbers>(DiaEnumerator);
539}
540
541std::unique_ptr<IPDBEnumLineNumbers>
543 CComPtr<IDiaEnumLineNumbers> DiaEnumerator;
544 if (S_OK != Symbol->findInlineeLinesByVA(VA, Length, &DiaEnumerator))
545 return nullptr;
546
547 return std::make_unique<DIAEnumLineNumbers>(DiaEnumerator);
548}
549
551 bytes.clear();
552
553 DWORD DataSize = 0;
554 Symbol->get_dataBytes(0, &DataSize, nullptr);
555 if (DataSize == 0)
556 return;
557
558 bytes.resize(DataSize);
559 Symbol->get_dataBytes(DataSize, &DataSize, bytes.data());
560}
561
563 CComBSTR Result16;
564 if (S_OK != Symbol->get_undecoratedNameEx((DWORD)Flags, &Result16))
565 return std::string();
566
567 const char *SrcBytes = reinterpret_cast<const char *>(Result16.m_str);
568 llvm::ArrayRef<char> SrcByteArray(SrcBytes, Result16.ByteLength());
569 std::string Result8;
570 if (!llvm::convertUTF16ToUTF8String(SrcByteArray, Result8))
571 return std::string();
572 return Result8;
573}
574
576 return PrivateGetDIAValue<DWORD, PDB_MemberAccess>(Symbol,
577 &IDiaSymbol::get_access);
578}
579
581 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_addressOffset);
582}
583
585 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_addressSection);
586}
587
589 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_age);
590}
591
593 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_arrayIndexTypeId);
594}
595
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);
601}
602
604 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_baseDataOffset);
605}
606
608 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_baseDataSlot);
609}
610
612 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_baseSymbolId);
613}
614
616 return PrivateGetDIAValue<DWORD, PDB_BuiltinType>(Symbol,
617 &IDiaSymbol::get_baseType);
618}
619
621 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_bitPosition);
622}
623
625 return PrivateGetDIAValue<DWORD, PDB_CallingConv>(
626 Symbol, &IDiaSymbol::get_callingConvention);
627}
628
630 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_classParentId);
631}
632
633std::string DIARawSymbol::getCompilerName() const {
634 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_compilerName);
635}
636
638 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_count);
639}
640
642 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_countLiveRanges);
643}
644
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);
650}
651
653 return PrivateGetDIAValue<DWORD, PDB_Lang>(Symbol, &IDiaSymbol::get_language);
654}
655
657 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_lexicalParentId);
658}
659
660std::string DIARawSymbol::getLibraryName() const {
661 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_libraryName);
662}
663
665 return PrivateGetDIAValue(Symbol,
666 &IDiaSymbol::get_liveRangeStartAddressOffset);
667}
668
670 return PrivateGetDIAValue(Symbol,
671 &IDiaSymbol::get_liveRangeStartAddressSection);
672}
673
675 return PrivateGetDIAValue(
676 Symbol, &IDiaSymbol::get_liveRangeStartRelativeVirtualAddress);
677}
678
680 return PrivateGetDIAValue<DWORD, codeview::RegisterId>(
681 Symbol, &IDiaSymbol::get_localBasePointerRegisterId);
682}
683
685 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_lowerBoundId);
686}
687
689 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_memorySpaceKind);
690}
691
692std::string DIARawSymbol::getName() const {
693 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_name);
694}
695
697 return PrivateGetDIAValue(Symbol,
698 &IDiaSymbol::get_numberOfAcceleratorPointerTags);
699}
700
702 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_numberOfColumns);
703}
704
706 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_numberOfModifiers);
707}
708
710 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_numberOfRegisterIndices);
711}
712
714 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_numberOfRows);
715}
716
718 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_objectFileName);
719}
720
722 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_oemId);
723}
724
726 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_oemSymbolId);
727}
728
730 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_offsetInUdt);
731}
732
734 return PrivateGetDIAValue<DWORD, PDB_Cpu>(Symbol, &IDiaSymbol::get_platform);
735}
736
738 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_rank);
739}
740
742 return PrivateGetDIAValue<DWORD, codeview::RegisterId>(
743 Symbol, &IDiaSymbol::get_registerId);
744}
745
747 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_registerType);
748}
749
751 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_relativeVirtualAddress);
752}
753
755 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_samplerSlot);
756}
757
759 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_signature);
760}
761
763 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_sizeInUdt);
764}
765
767 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_slot);
768}
769
771 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_sourceFileName);
772}
773
774std::unique_ptr<IPDBLineNumber> DIARawSymbol::getSrcLineOnTypeDefn() const {
775 CComPtr<IDiaLineNumber> LineNumber;
776 if (FAILED(Symbol->getSrcLineOnTypeDefn(&LineNumber)) || !LineNumber)
777 return nullptr;
778
779 return std::make_unique<DIALineNumber>(LineNumber);
780}
781
783 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_stride);
784}
785
787 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_subTypeId);
788}
789
791 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_symbolsFileName);
792}
793
795 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_symIndexId);
796}
797
799 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_targetOffset);
800}
801
803 return PrivateGetDIAValue(Symbol,
804 &IDiaSymbol::get_targetRelativeVirtualAddress);
805}
806
808 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_targetVirtualAddress);
809}
810
812 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_targetSection);
813}
814
816 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_textureSlot);
817}
818
820 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_timeStamp);
821}
822
824 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_token);
825}
826
828 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_typeId);
829}
830
832 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_uavSlot);
833}
834
836 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_undecoratedName);
837}
838
840 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_unmodifiedTypeId);
841}
842
844 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_upperBoundId);
845}
846
848 VARIANT Value;
849 Value.vt = VT_EMPTY;
850 if (S_OK != Symbol->get_value(&Value))
851 return Variant();
852
853 return VariantFromVARIANT(Value);
854}
855
857 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtualBaseDispIndex);
858}
859
861 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtualBaseOffset);
862}
863
865 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtualTableShapeId);
866}
867
868std::unique_ptr<PDBSymbolTypeBuiltin>
870 CComPtr<IDiaSymbol> TableType;
871 if (FAILED(Symbol->get_virtualBaseTableType(&TableType)) || !TableType)
872 return nullptr;
873
874 auto RawVT = std::make_unique<DIARawSymbol>(Session, TableType);
875 auto Pointer =
876 PDBSymbol::createAs<PDBSymbolTypePointer>(Session, std::move(RawVT));
877 return unique_dyn_cast<PDBSymbolTypeBuiltin>(Pointer->getPointeeType());
878}
879
881 return PrivateGetDIAValue<DWORD, PDB_DataKind>(Symbol,
882 &IDiaSymbol::get_dataKind);
883}
884
886 return PrivateGetDIAValue<DWORD, PDB_SymType>(Symbol,
887 &IDiaSymbol::get_symTag);
888}
889
891 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_guid);
892}
893
894int32_t DIARawSymbol::getOffset() const {
895 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_offset);
896}
897
899 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_thisAdjust);
900}
901
903 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtualBasePointerOffset);
904}
905
907 return PrivateGetDIAValue<DWORD, PDB_LocType>(Symbol,
908 &IDiaSymbol::get_locationType);
909}
910
912 return PrivateGetDIAValue<DWORD, PDB_Machine>(Symbol,
913 &IDiaSymbol::get_machineType);
914}
915
917 return PrivateGetDIAValue<DWORD, codeview::ThunkOrdinal>(
918 Symbol, &IDiaSymbol::get_thunkOrdinal);
919}
920
922 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_length);
923}
924
926 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_liveRangeLength);
927}
928
930 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtualAddress);
931}
932
934 return PrivateGetDIAValue<DWORD, PDB_UdtType>(Symbol,
935 &IDiaSymbol::get_udtKind);
936}
937
939 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_constructor);
940}
941
943 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_customCallingConvention);
944}
945
947 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_farReturn);
948}
949
951 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_code);
952}
953
955 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_compilerGenerated);
956}
957
959 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_constType);
960}
961
963 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_editAndContinueEnabled);
964}
965
967 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_function);
968}
969
971 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_addressTaken);
972}
973
975 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_noStackOrdering);
976}
977
979 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasAlloca);
980}
981
983 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasAssignmentOperator);
984}
985
987 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isCTypes);
988}
989
991 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasCastOperator);
992}
993
995 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasDebugInfo);
996}
997
999 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasEH);
1000}
1001
1003 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasEHa);
1004}
1005
1007 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasInlAsm);
1008}
1009
1011 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_inlSpec);
1012}
1013
1015 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_interruptReturn);
1016}
1017
1019 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_framePointerPresent);
1020}
1021
1023 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasLongJump);
1024}
1025
1027 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasManagedCode);
1028}
1029
1031 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasNestedTypes);
1032}
1033
1035 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_noInline);
1036}
1037
1039 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_noReturn);
1040}
1041
1043 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_optimizedCodeDebugInfo);
1044}
1045
1047 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_overloadedOperator);
1048}
1049
1051 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasSEH);
1052}
1053
1055 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasSecurityChecks);
1056}
1057
1059 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasSetJump);
1060}
1061
1063 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_strictGSCheck);
1064}
1065
1067 return PrivateGetDIAValue(Symbol,
1068 &IDiaSymbol::get_isAcceleratorGroupSharedLocal);
1069}
1070
1072 return PrivateGetDIAValue(Symbol,
1073 &IDiaSymbol::get_isAcceleratorPointerTagLiveRange);
1074}
1075
1077 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isAcceleratorStubFunction);
1078}
1079
1081 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isAggregated);
1082}
1083
1085 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_intro);
1086}
1087
1089 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isCVTCIL);
1090}
1091
1093 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isConstructorVirtualBase);
1094}
1095
1097 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isCxxReturnUdt);
1098}
1099
1101 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isDataAligned);
1102}
1103
1105 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isHLSLData);
1106}
1107
1109 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isHotpatchable);
1110}
1111
1113 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_indirectVirtualBaseClass);
1114}
1115
1117 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isInterfaceUdt);
1118}
1119
1121 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_intrinsic);
1122}
1123
1125 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isLTCG);
1126}
1127
1129 return PrivateGetDIAValue(Symbol,
1130 &IDiaSymbol::get_isLocationControlFlowDependent);
1131}
1132
1134 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isMSILNetmodule);
1135}
1136
1138 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isMatrixRowMajor);
1139}
1140
1142 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_managed);
1143}
1144
1146 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_msil);
1147}
1148
1150 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isMultipleInheritance);
1151}
1152
1154 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isNaked);
1155}
1156
1158 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_nested);
1159}
1160
1162 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isOptimizedAway);
1163}
1164
1166 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_packed);
1167}
1168
1170 return PrivateGetDIAValue(Symbol,
1171 &IDiaSymbol::get_isPointerBasedOnSymbolValue);
1172}
1173
1175 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isPointerToDataMember);
1176}
1177
1179 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isPointerToMemberFunction);
1180}
1181
1183 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_pure);
1184}
1185
1187 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_RValueReference);
1188}
1189
1191 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isRefUdt);
1192}
1193
1195 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_reference);
1196}
1197
1199 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_restrictedType);
1200}
1201
1203 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isReturnValue);
1204}
1205
1207 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isSafeBuffers);
1208}
1209
1211 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_scoped);
1212}
1213
1215 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isSdl);
1216}
1217
1219 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isSingleInheritance);
1220}
1221
1223 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isSplitted);
1224}
1225
1227 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isStatic);
1228}
1229
1231 // hasPrivateSymbols is the opposite of isStripped, but we expose
1232 // hasPrivateSymbols as a more intuitive interface.
1233 return !PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isStripped);
1234}
1235
1237 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_unalignedType);
1238}
1239
1241 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_notReached);
1242}
1243
1245 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isValueUdt);
1246}
1247
1249 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtual);
1250}
1251
1253 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtualBaseClass);
1254}
1255
1257 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isVirtualInheritance);
1258}
1259
1261 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_volatileType);
1262}
1263
1265 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_wasInlined);
1266}
1267
1268std::string DIARawSymbol::getUnused() const {
1269 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_unused);
1270}
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
ArgType PrivateGetDIAValue(IDiaFrameData *FrameData, HRESULT(__stdcall IDiaFrameData::*Method)(ArgType *))
#define RAW_METHOD_DUMP_AS(Stream, Method, Type)
#define RAW_METHOD_DUMP(Stream, Method)
#define RAW_ID_METHOD_DUMP(Stream, Method, Session, FieldId, ShowFlags, RecurseFlags)
std::string invokeBstrMethod(Obj &Object, HRESULT(__stdcall Obj::*Func)(BSTR *))
Definition: DIAUtils.h:17
Performs the initial survey of the specified function
Given that RA is a live value
std::string Name
#define G(x, y, z)
Definition: MD5.cpp:56
static const char * name
Definition: SMEABIPass.cpp:46
This file contains some templates that are useful if you are working with the STL at all.
raw_pwrite_stream & OS
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: ArrayRef.h:41
void resize(size_type N)
Definition: SmallVector.h:638
pointer data()
Return a pointer to the vector's buffer, even if empty().
Definition: SmallVector.h:286
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1196
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:51
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
LLVM Value Representation.
Definition: Value.h:74
uint32_t getNumberOfModifiers() const override
bool isDataAligned() const override
bool isCxxReturnUdt() const override
bool hasOptimizedCodeDebugInfo() const override
bool isScoped() const override
std::unique_ptr< IPDBEnumSymbols > findChildrenByVA(PDB_SymType Type, StringRef Name, PDB_NameSearchFlags Flags, uint64_t VA) const override
SymIndexId getUpperBoundId() const override
bool hasInterruptReturn() const override
bool isStatic() const override
uint32_t getTextureSlot() const override
uint32_t getVirtualBaseDispIndex() const override
uint32_t getAddressOffset() const override
std::unique_ptr< IPDBEnumLineNumbers > findInlineeLines() const override
void getFrontEndVersion(VersionInfo &Version) const override
SymIndexId getTypeId() const override
bool hasEHa() const override
std::string getUndecoratedNameEx(PDB_UndnameFlags Flags) const override
bool isCVTCIL() const override
std::unique_ptr< IPDBEnumLineNumbers > findInlineeLinesByRVA(uint32_t RVA, uint32_t Length) const override
bool isOptimizedAway() const override
bool isVolatileType() const override
bool isInterfaceUdt() const override
bool isEditAndContinueEnabled() const override
Variant getValue() const override
uint32_t getSignature() const override
bool isUnalignedType() const override
std::string getName() const override
bool hasLongJump() const override
bool hasCustomCallingConvention() const override
PDB_DataKind getDataKind() const override
PDB_Cpu getPlatform() const override
uint32_t getCountLiveRanges() const override
bool isHotpatchable() const override
bool isReturnValue() const override
uint32_t getBaseDataOffset() const override
PDB_MemberAccess getAccess() const override
std::unique_ptr< IPDBEnumSymbols > findChildrenByAddr(PDB_SymType Type, StringRef Name, PDB_NameSearchFlags Flags, uint32_t Section, uint32_t Offset) const override
int32_t getThisAdjust() const override
bool isIntroVirtualFunction() const override
bool isAcceleratorGroupSharedLocal() const override
bool hasNoReturnAttribute() const override
SymIndexId getLowerBoundId() const override
bool hasNestedTypes() const override
bool hasCTypes() const override
std::string getSymbolsFileName() const override
uint32_t getNumberOfRows() const override
std::unique_ptr< IPDBEnumSymbols > findInlineFramesByAddr(uint32_t Section, uint32_t Offset) const override
PDB_Lang getLanguage() const override
bool wasInlined() const override
uint32_t getLiveRangeStartAddressSection() const override
bool isPacked() const override
bool getNoStackOrdering() const override
uint32_t getAge() const override
void getBackEndVersion(VersionInfo &Version) const override
uint32_t getSizeInUdt() const override
bool isLocationControlFlowDependent() const override
PDB_CallingConv getCallingConvention() const override
std::string getUndecoratedName() const override
uint32_t getTargetRelativeVirtualAddress() const override
SymIndexId getArrayIndexTypeId() const override
DIARawSymbol(const DIASession &PDBSession, CComPtr< IDiaSymbol > DiaSymbol)
bool isReference() const override
bool isMultipleInheritance() const override
bool isAggregated() const override
bool isConstructorVirtualBase() const override
bool isSplitted() const override
uint32_t getRegisterType() const override
uint32_t getOffsetInUdt() const override
uint32_t getRelativeVirtualAddress() const override
std::unique_ptr< IPDBEnumLineNumbers > findInlineeLinesByAddr(uint32_t Section, uint32_t Offset, uint32_t Length) const override
PDB_UdtType getUdtKind() const override
bool isCompilerGenerated() const override
bool isIntrinsic() const override
bool isManagedCode() const override
bool isMSILNetmodule() const override
bool hasEH() const override
bool hasConstructor() const override
bool isVirtualInheritance() const override
uint32_t getNumberOfColumns() const override
uint64_t getTargetVirtualAddress() const override
PDB_SymType getSymTag() const override
std::unique_ptr< IPDBEnumSymbols > findInlineFramesByVA(uint64_t VA) const override
bool isNested() const override
bool isVirtual() const override
SymIndexId getVirtualTableShapeId() const override
bool isCode() const override
std::string getUnused() const override
bool isFunction() const override
int32_t getOffset() const override
bool hasAlloca() const override
std::string getCompilerName() const override
bool isAcceleratorStubFunction() const override
SymIndexId getBaseSymbolId() const override
bool hasNoInlineAttribute() const override
bool isSdl() const override
SymIndexId getUnmodifiedTypeId() const override
bool hasStrictGSCheck() const override
codeview::GUID getGuid() const override
uint32_t getNumberOfRegisterIndices() const override
bool hasSEH() const override
uint32_t getVirtualBaseOffset() const override
std::string getSourceFileName() const override
bool isUnreached() const override
SymIndexId getSubTypeId() const override
bool hasOverloadedOperator() const override
std::unique_ptr< IPDBLineNumber > getSrcLineOnTypeDefn() const override
uint32_t getBitPosition() const override
bool isPointerBasedOnSymbolValue() const override
uint32_t getSlot() const override
uint32_t getMemorySpaceKind() const override
uint32_t getUavSlot() const override
std::unique_ptr< IPDBEnumSymbols > findInlineFramesByRVA(uint32_t RVA) const override
bool hasInlAsm() const override
uint32_t getOemId() const override
bool isRefUdt() const override
uint32_t getTimeStamp() const override
bool isSafeBuffers() const override
bool isPointerToDataMember() const override
SymIndexId getOemSymbolId() const override
bool isPureVirtual() const override
bool isValueUdt() const override
uint32_t getSamplerSlot() const override
bool isLTCG() const override
bool isNaked() const override
codeview::RegisterId getRegisterId() const override
bool isSingleInheritance() const override
bool isHLSLData() const override
bool hasSetJump() const override
uint32_t getLiveRangeStartAddressOffset() const override
uint32_t getStride() const override
uint32_t getRank() const override
bool isIndirectVirtualBaseClass() const override
bool hasFarReturn() const override
uint32_t getNumberOfAcceleratorPointerTags() const override
uint32_t getAddressSection() const override
bool isConstType() const override
uint64_t getLength() const override
std::unique_ptr< IPDBEnumSymbols > findChildrenByRVA(PDB_SymType Type, StringRef Name, PDB_NameSearchFlags Flags, uint32_t RVA) const override
bool isPointerToMemberFunction() const override
PDB_BuiltinType getBuiltinType() const override
std::unique_ptr< IPDBEnumSymbols > findChildren(PDB_SymType Type) const override
SymIndexId getClassParentId() const override
bool isAcceleratorPointerTagLiveRange() const override
bool isVirtualBaseClass() const override
bool isRestrictedType() const override
bool hasDebugInfo() const override
codeview::RegisterId getLocalBasePointerRegisterId() const override
SymIndexId getSymIndexId() const override
std::string getObjectFileName() const override
uint64_t getLiveRangeLength() const override
bool hasFramePointer() const override
bool hasManagedCode() const override
PDB_LocType getLocationType() const override
bool hasCastOperator() const override
bool isMatrixRowMajor() const override
uint32_t getToken() const override
bool hasPrivateSymbols() const override
uint32_t getBaseDataSlot() const override
SymIndexId getLexicalParentId() const override
int32_t getVirtualBasePointerOffset() const override
bool getAddressTaken() const override
uint32_t getLiveRangeStartRelativeVirtualAddress() const override
void getDataBytes(llvm::SmallVector< uint8_t, 32 > &bytes) const override
bool isMSILCode() const override
std::string getLibraryName() const override
bool hasInlineAttribute() const override
bool hasAssignmentOperator() const override
uint64_t getVirtualAddress() const override
uint32_t getCount() const override
codeview::ThunkOrdinal getThunkOrdinal() const override
uint32_t getTargetSection() const override
PDB_Machine getMachineType() const override
std::unique_ptr< PDBSymbolTypeBuiltin > getVirtualBaseTableType() const override
bool hasSecurityChecks() const override
uint32_t getTargetOffset() const override
bool isRValueReference() const override
void dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields, PdbSymbolIdField RecurseIdFields) const override
std::unique_ptr< IPDBEnumLineNumbers > findInlineeLinesByVA(uint64_t VA, uint32_t Length) const override
IPDBSession defines an interface used to provide a context for querying debug information from a debu...
Definition: IPDBSession.h:25
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:52
CPUType
These values correspond to the CV_CPU_TYPE_e enumeration, and are documented here: https://msdn....
Definition: CodeView.h:76
CallingConvention
These values correspond to the CV_call_e enumeration, and are documented at the following locations: ...
Definition: CodeView.h:184
ThunkOrdinal
These values correspond to the THUNK_ORDINAL enumeration.
Definition: CodeView.h:563
SourceLanguage
These values correspond to the CV_CFL_LANG enumeration in the Microsoft Debug Interface Access SDK,...
Definition: CodeView.h:146
PDB_NameSearchFlags
Defines flags used for enumerating child symbols.
Definition: PDBTypes.h:102
void dumpSymbolField(raw_ostream &OS, StringRef Name, T Value, int Indent)
Definition: PDBExtras.h:47
PDB_BuiltinType
These values correspond to the Basictype enumeration, and are documented here: https://msdn....
Definition: PDBTypes.h:335
PDB_MemberAccess
Definition: PDBTypes.h:385
PDB_UdtType
These values correspond to the UdtKind enumeration, and are documented here: https://msdn....
Definition: PDBTypes.h:310
PDB_SymType
These values correspond to the SymTagEnum enumeration, and are documented here: https://msdn....
Definition: PDBTypes.h:243
PDB_LocType
These values correspond to the LocationType enumeration, and are documented here: https://msdn....
Definition: PDBTypes.h:292
PDB_DataKind
These values correspond to the DataKind enumeration, and are documented here: https://msdn....
Definition: PDBTypes.h:228
PDB_UndnameFlags
These values correspond to the flags that can be combined to control the return of an undecorated nam...
Definition: PDBTypes.h:362
void dumpSymbolIdField(raw_ostream &OS, StringRef Name, SymIndexId Value, int Indent, const IPDBSession &Session, PdbSymbolIdField FieldId, PdbSymbolIdField ShowFlags, PdbSymbolIdField RecurseFlags)
Definition: PDBSymbol.cpp:202
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
@ Length
Definition: DWP.cpp:480
bool convertUTF16ToUTF8String(ArrayRef< char > SrcBytes, std::string &Out)
Converts a stream of raw bytes assumed to be UTF16 into a UTF8 std::string.
auto count(R &&Range, const E &Element)
Wrapper function around std::count to count the number of times an element Element occurs in the give...
Definition: STLExtras.h:1938
raw_ostream & operator<<(raw_ostream &OS, const APFixedPoint &FX)
Definition: APFixedPoint.h:303
bool convertUTF8ToUTF16String(StringRef SrcUTF8, SmallVectorImpl< UTF16 > &DstUTF16)
Converts a UTF-8 string into a UTF-16 string with native endianness.
This represents the 'GUID' type from windows.h.
Definition: GUID.h:21
Utility type to build an inheritance chain that makes it easy to rank overload candidates.
Definition: STLExtras.h:1496