LLVM  9.0.0svn
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 
26 using namespace llvm;
27 using namespace llvm::pdb;
28 
29 namespace {
30 Variant 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;
40  break;
41  case VT_I4:
42  Result.Value.Int32 = V.intVal;
44  break;
45  case VT_I8:
46  Result.Value.Int64 = V.llVal;
48  break;
49  case VT_UI1:
50  Result.Value.UInt8 = V.bVal;
52  break;
53  case VT_UI2:
54  Result.Value.UInt16 = V.uiVal;
56  break;
57  case VT_UI4:
58  Result.Value.UInt32 = V.uintVal;
60  break;
61  case VT_UI8:
62  Result.Value.UInt64 = V.ullVal;
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;
72  break;
73  case VT_R8:
74  Result.Value.Double = V.dblVal;
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());
86  break;
87  }
88  default:
90  break;
91  }
92  return Result;
93 }
94 
95 template <typename ArgType>
96 ArgType 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 
105 template <typename ArgType, typename RetType>
106 RetType 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 
115 std::string
116 PrivateGetDIAValue(IDiaSymbol *Symbol,
117  HRESULT (__stdcall IDiaSymbol::*Method)(BSTR *)) {
118  return invokeBstrMethod(*Symbol, Method);
119 }
120 
122 PrivateGetDIAValue(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 
135 template <typename PrintType, typename ArgType>
136 void 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 
144 void 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 
155 template <typename ArgType>
156 void 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 
164 void 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 
178 void 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 
191 namespace llvm {
193  StringRef GuidBytes(reinterpret_cast<const char *>(&G), sizeof(G));
194  codeview::detail::GuidAdapter A(GuidBytes);
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 
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);
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);
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,
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);
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,
290  RecurseIdFields);
291  RAW_METHOD_DUMP(OS, uavSlot);
292  RAW_METHOD_DUMP(OS, undecoratedName);
293  RAW_ID_METHOD_DUMP(OS, unmodifiedTypeId, Session,
294  PdbSymbolIdField::UnmodifiedType, ShowIdFields,
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);
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);
324  RAW_METHOD_DUMP(OS, isCTypes);
327  RAW_METHOD_DUMP(OS, hasEH);
328  RAW_METHOD_DUMP(OS, hasEHa);
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);
340  RAW_METHOD_DUMP(OS, hasSEH);
343  RAW_METHOD_DUMP(OS, strictGSCheck);
348  RAW_METHOD_DUMP(OS, intro);
355  RAW_METHOD_DUMP(OS, indirectVirtualBaseClass);
357  RAW_METHOD_DUMP(OS, intrinsic);
358  RAW_METHOD_DUMP(OS, isLTCG);
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);
380  RAW_METHOD_DUMP(OS, isSdl);
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);
394  RAW_METHOD_DUMP(OS, value);
395 }
396 
397 std::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 llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
409 }
410 
411 std::unique_ptr<IPDBEnumSymbols>
413  PDB_NameSearchFlags Flags) const {
415  llvm::convertUTF8ToUTF16String(Name, Name16);
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 llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
427 }
428 
429 std::unique_ptr<IPDBEnumSymbols>
432  uint32_t Offset) const {
434  llvm::convertUTF8ToUTF16String(Name, Name16);
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 llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
447 }
448 
449 std::unique_ptr<IPDBEnumSymbols>
451  PDB_NameSearchFlags Flags, uint64_t VA) const {
453  llvm::convertUTF8ToUTF16String(Name, Name16);
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 llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
466 }
467 
468 std::unique_ptr<IPDBEnumSymbols>
470  PDB_NameSearchFlags Flags, uint32_t RVA) const {
472  llvm::convertUTF8ToUTF16String(Name, Name16);
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 llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
484 }
485 
486 std::unique_ptr<IPDBEnumSymbols>
488  CComPtr<IDiaEnumSymbols> DiaEnumerator;
489  if (S_OK != Symbol->findInlineFramesByAddr(Section, Offset, &DiaEnumerator))
490  return nullptr;
491 
492  return llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
493 }
494 
495 std::unique_ptr<IPDBEnumSymbols>
497  CComPtr<IDiaEnumSymbols> DiaEnumerator;
498  if (S_OK != Symbol->findInlineFramesByRVA(RVA, &DiaEnumerator))
499  return nullptr;
500 
501  return llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
502 }
503 
504 std::unique_ptr<IPDBEnumSymbols>
506  CComPtr<IDiaEnumSymbols> DiaEnumerator;
507  if (S_OK != Symbol->findInlineFramesByVA(VA, &DiaEnumerator))
508  return nullptr;
509 
510  return llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
511 }
512 
513 std::unique_ptr<IPDBEnumLineNumbers> DIARawSymbol::findInlineeLines() const {
514  CComPtr<IDiaEnumLineNumbers> DiaEnumerator;
515  if (S_OK != Symbol->findInlineeLines(&DiaEnumerator))
516  return nullptr;
517 
518  return llvm::make_unique<DIAEnumLineNumbers>(DiaEnumerator);
519 }
520 
521 std::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 llvm::make_unique<DIAEnumLineNumbers>(DiaEnumerator);
530 }
531 
532 std::unique_ptr<IPDBEnumLineNumbers>
534  CComPtr<IDiaEnumLineNumbers> DiaEnumerator;
535  if (S_OK != Symbol->findInlineeLinesByRVA(RVA, Length, &DiaEnumerator))
536  return nullptr;
537 
538  return llvm::make_unique<DIAEnumLineNumbers>(DiaEnumerator);
539 }
540 
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))
545  return nullptr;
546 
547  return llvm::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 
633 std::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 
660 std::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 
692 std::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 
717 std::string DIARawSymbol::getObjectFileName() const {
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 
770 std::string DIARawSymbol::getSourceFileName() const {
771  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_sourceFileName);
772 }
773 
774 std::unique_ptr<IPDBLineNumber> DIARawSymbol::getSrcLineOnTypeDefn() const {
775  CComPtr<IDiaLineNumber> LineNumber;
776  if (FAILED(Symbol->getSrcLineOnTypeDefn(&LineNumber)) || !LineNumber)
777  return nullptr;
778 
779  return llvm::make_unique<DIALineNumber>(LineNumber);
780 }
781 
783  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_stride);
784 }
785 
787  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_subTypeId);
788 }
789 
790 std::string DIARawSymbol::getSymbolsFileName() const {
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 
835 std::string DIARawSymbol::getUndecoratedName() const {
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 
868 std::unique_ptr<PDBSymbolTypeBuiltin>
870  CComPtr<IDiaSymbol> TableType;
871  if (FAILED(Symbol->get_virtualBaseTableType(&TableType)) || !TableType)
872  return nullptr;
873 
874  auto RawVT = llvm::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 
894 int32_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 
921 uint64_t DIARawSymbol::getLength() const {
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 
950 bool DIARawSymbol::isCode() const {
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 
998 bool DIARawSymbol::hasEH() const {
999  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasEH);
1000 }
1001 
1002 bool DIARawSymbol::hasEHa() const {
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 
1050 bool DIARawSymbol::hasSEH() const {
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 
1124 bool DIARawSymbol::isLTCG() const {
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 
1214 bool DIARawSymbol::isSdl() const {
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 
1268 std::string DIARawSymbol::getUnused() const {
1269  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_unused);
1270 }
bool hasAlloca() const override
bool hasInlineAttribute() const override
bool hasNoReturnAttribute() const override
uint32_t getToken() const override
IPDBSession defines an interface used to provide a context for querying debug information from a debu...
Definition: IPDBSession.h:25
uint32_t getLiveRangeStartRelativeVirtualAddress() const override
bool hasInterruptReturn() const override
bool isRValueReference() const override
std::unique_ptr< IPDBEnumSymbols > findInlineFramesByVA(uint64_t VA) const override
std::unique_ptr< IPDBEnumSymbols > findInlineFramesByAddr(uint32_t Section, uint32_t Offset) const override
PDB_UdtType getUdtKind() const override
This class represents lattice values for constants.
Definition: AllocatorList.h:23
int32_t getOffset() const override
void dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields, PdbSymbolIdField RecurseIdFields) const override
bool isStatic() const override
codeview::RegisterId getLocalBasePointerRegisterId() const override
uint32_t getNumberOfColumns() const override
amdgpu Simplify well known AMD library false FunctionCallee Value const Twine & Name
uint32_t getTargetOffset() const override
LLVM_NODISCARD auto unique_dyn_cast(std::unique_ptr< Y > &Val) -> decltype(cast< X >(Val))
Definition: Casting.h:377
bool hasOptimizedCodeDebugInfo() const override
SymIndexId getClassParentId() const override
#define RAW_ID_METHOD_DUMP(Stream, Method, Session, FieldId, ShowFlags, RecurseFlags)
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:249
uint32_t getTextureSlot() const override
#define RAW_METHOD_DUMP_AS(Stream, Method, Type)
bool isNaked() const override
uint32_t getVirtualBaseDispIndex() const override
PDB_NameSearchFlags
Defines flags used for enumerating child symbols.
Definition: PDBTypes.h:100
bool isValueUdt() const override
std::unique_ptr< IPDBEnumLineNumbers > findInlineeLinesByAddr(uint32_t Section, uint32_t Offset, uint32_t Length) const override
SymIndexId getBaseSymbolId() const override
SymIndexId getOemSymbolId() const override
std::string getUnused() const override
bool isConstructorVirtualBase() const override
bool getNoStackOrdering() const override
bool isPureVirtual() const override
bool isSdl() const override
SymIndexId getVirtualTableShapeId() const override
std::string getSymbolsFileName() const override
std::unique_ptr< IPDBEnumLineNumbers > findInlineeLinesByVA(uint64_t VA, uint32_t Length) const override
bool isFunction() const override
bool isReturnValue() const override
PDB_Machine getMachineType() const override
bool isRefUdt() const override
bool hasManagedCode() const override
bool isVirtual() const override
bool hasOverloadedOperator() const override
raw_ostream & operator<<(raw_ostream &OS, const PDB_VariantType &Value)
Definition: PDBExtras.cpp:24
bool hasCastOperator() const override
uint32_t getStride() const override
bool hasEHa() const override
bool isIntroVirtualFunction() const override
uint32_t getNumberOfRegisterIndices() const override
std::string getName() const override
codeview::ThunkOrdinal getThunkOrdinal() const override
void format(raw_ostream &Stream, StringRef Style) override
Definition: Formatters.cpp:26
SymIndexId getUnmodifiedTypeId() const override
This represents the &#39;GUID&#39; type from windows.h.
Definition: GUID.h:21
bool isScoped() const override
SymIndexId getLowerBoundId() const override
std::unique_ptr< IPDBLineNumber > getSrcLineOnTypeDefn() const override
std::string getUndecoratedNameEx(PDB_UndnameFlags Flags) const override
bool isCxxReturnUdt() const override
bool isVolatileType() const override
uint32_t getNumberOfAcceleratorPointerTags() const override
SymIndexId getUpperBoundId() const override
PDB_SymType getSymTag() const override
bool isNested() const override
bool isMSILNetmodule() const override
bool isPointerToMemberFunction() const override
uint64_t getLength() const override
SymIndexId getSymIndexId() const override
bool isOptimizedAway() const override
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
Definition: APInt.h:32
bool isIndirectVirtualBaseClass() const override
std::unique_ptr< IPDBEnumSymbols > findChildrenByVA(PDB_SymType Type, StringRef Name, PDB_NameSearchFlags Flags, uint64_t VA) const override
uint32_t getTimeStamp() const override
bool isIntrinsic() 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:300
bool convertUTF8ToUTF16String(StringRef SrcUTF8, SmallVectorImpl< UTF16 > &DstUTF16)
Converts a UTF-8 string into a UTF-16 string with native endianness.
void getFrontEndVersion(VersionInfo &Version) const override
PDB_BuiltinType getBuiltinType() const override
bool hasCustomCallingConvention() const override
uint32_t getLiveRangeStartAddressOffset() const override
bool isLocationControlFlowDependent() const override
bool isAcceleratorPointerTagLiveRange() const override
auto count(R &&Range, const E &Element) -> typename std::iterator_traits< decltype(adl_begin(Range))>::difference_type
Wrapper function around std::count to count the number of times an element Element occurs in the give...
Definition: STLExtras.h:1251
bool isRestrictedType() const override
bool hasCTypes() 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:182
uint32_t getRank() const override
PDB_MemberAccess getAccess() const override
uint32_t UInt32
Definition: PDBTypes.h:402
bool getAddressTaken() const override
uint32_t getTargetSection() const override
ArgType PrivateGetDIAValue(IDiaFrameData *FrameData, HRESULT(__stdcall IDiaFrameData::*Method)(ArgType *))
uint32_t getRegisterType() const override
bool isAcceleratorGroupSharedLocal() const override
bool isEditAndContinueEnabled() const override
The instances of the Type class are immutable: once they are created, they are never changed...
Definition: Type.h:45
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:167
void getDataBytes(llvm::SmallVector< uint8_t, 32 > &bytes) const override
bool isPointerBasedOnSymbolValue() const override
uint32_t getOffsetInUdt() const override
bool isAcceleratorStubFunction() const override
std::unique_ptr< IPDBEnumSymbols > findChildrenByAddr(PDB_SymType Type, StringRef Name, PDB_NameSearchFlags Flags, uint32_t Section, uint32_t Offset) const override
void dumpSymbolField(raw_ostream &OS, StringRef Name, T Value, int Indent)
Definition: PDBExtras.h:48
bool isDataAligned() const override
uint64_t getTargetVirtualAddress() const override
bool hasNestedTypes() const override
codeview::GUID getGuid() const override
SymIndexId getLexicalParentId() const override
void dumpSymbolIdField(raw_ostream &OS, StringRef Name, SymIndexId Value, int Indent, const IPDBSession &Session, PdbSymbolIdField FieldId, PdbSymbolIdField ShowFlags, PdbSymbolIdField RecurseFlags)
Definition: PDBSymbol.cpp:185
bool isVirtualBaseClass() const override
bool hasEH() const override
bool wasInlined() const override
bool isAggregated() const override
bool isMSILCode() const override
uint32_t getSizeInUdt() const override
PDB_LocType
These values correspond to the LocationType enumeration, and are documented here: https://msdn...
Definition: PDBTypes.h:231
uint32_t getTargetRelativeVirtualAddress() const override
uint64_t UInt64
Definition: PDBTypes.h:403
bool isPacked() const override
PDB_CallingConv getCallingConvention() const override
std::string getCompilerName() const override
uint64_t getLiveRangeLength() const override
bool isConstType() const override
bool isCode() const override
uint32_t getSignature() 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:143
bool hasSEH() const override
std::string invokeBstrMethod(Obj &Object, HRESULT(__stdcall Obj::*Func)(BSTR *))
Definition: DIAUtils.h:16
std::unique_ptr< IPDBEnumSymbols > findInlineFramesByRVA(uint32_t RVA) const override
This is a &#39;vector&#39; (really, a variable-sized array), optimized for the case when the array is small...
Definition: SmallVector.h:841
bool isCVTCIL() const override
int32_t getVirtualBasePointerOffset() const override
bool isManagedCode() const override
bool hasPrivateSymbols() const override
bool isSafeBuffers() const override
CPUType
These values correspond to the CV_CPU_TYPE_e enumeration, and are documented here: https://msdn...
Definition: CodeView.h:78
int32_t getThisAdjust() const override
std::string getLibraryName() const override
const DataFlowGraph & G
Definition: RDFGraph.cpp:202
codeview::RegisterId getRegisterId() const override
bool isMatrixRowMajor() const override
bool isHLSLData() const override
uint32_t getSlot() const override
std::unique_ptr< IPDBEnumLineNumbers > findInlineeLinesByRVA(uint32_t RVA, uint32_t Length) const override
SymIndexId getArrayIndexTypeId() const override
bool hasLongJump() const override
bool hasAssignmentOperator() const override
uint32_t getVirtualBaseOffset() const override
DIARawSymbol(const DIASession &PDBSession, CComPtr< IDiaSymbol > DiaSymbol)
std::string getSourceFileName() const override
uint32_t getBaseDataOffset() const override
SymIndexId getTypeId() const override
bool convertUTF16ToUTF8String(ArrayRef< char > SrcBytes, std::string &Out)
Converts a stream of raw bytes assumed to be UTF16 into a UTF8 std::string.
bool hasSetJump() const override
bool isVirtualInheritance() const override
bool isUnreached() const override
SymIndexId getSubTypeId() const override
bool isPointerToDataMember() const override
uint32_t getNumberOfModifiers() const override
PDB_LocType getLocationType() const override
bool hasStrictGSCheck() const override
pointer data()
Return a pointer to the vector&#39;s buffer, even if empty().
Definition: SmallVector.h:144
bool hasSecurityChecks() const override
void getBackEndVersion(VersionInfo &Version) const override
std::unique_ptr< IPDBEnumLineNumbers > findInlineeLines() const override
bool hasFramePointer() const override
#define RAW_METHOD_DUMP(Stream, Method)
uint32_t getNumberOfRows() const override
std::string getUndecoratedName() const override
uint32_t getAddressSection() const override
uint32_t getAge() const override
PDB_Cpu getPlatform() const override
uint16_t UInt16
Definition: PDBTypes.h:401
union llvm::pdb::Variant::@223 Value
uint32_t getOemId() const override
bool isHotpatchable() const override
bool isMultipleInheritance() const override
ThunkOrdinal
These values correspond to the THUNK_ORDINAL enumeration.
Definition: CodeView.h:531
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:274
Definition: JSON.cpp:597
std::unique_ptr< IPDBEnumSymbols > findChildren(PDB_SymType Type) const override
bool hasNoInlineAttribute() const override
bool isLTCG() const override
uint32_t getCount() const override
LLVM Value Representation.
Definition: Value.h:72
bool isSplitted() const override
static const char * name
uint64_t getVirtualAddress() const override
std::unique_ptr< IPDBEnumSymbols > findChildrenByRVA(PDB_SymType Type, StringRef Name, PDB_NameSearchFlags Flags, uint32_t RVA) const override
CallingConvention
These values correspond to the CV_call_e enumeration, and are documented at the following locations: ...
Definition: CodeView.h:173
uint32_t getMemorySpaceKind() const override
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:45
bool isCompilerGenerated() const override
std::error_code access(const Twine &Path, AccessMode Mode)
Can the file be accessed?
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:48
Variant getValue() const override
bool isSingleInheritance() const override
uint32_t getLiveRangeStartAddressSection() const override
PDB_Lang getLanguage() const override
PDB_VariantType Type
Definition: PDBTypes.h:391
std::string getObjectFileName() const override
bool isInterfaceUdt() const override
Utility type to build an inheritance chain that makes it easy to rank overload candidates.
Definition: STLExtras.h:1010
bool isReference() const override
PDB_DataKind getDataKind() const override
bool hasInlAsm() const override
uint32_t getAddressOffset() const override
uint32_t getUavSlot() const override
uint32_t getBitPosition() const override
uint32_t getBaseDataSlot() const override
const uint64_t Version
Definition: InstrProf.h:904
bool hasConstructor() const override
bool isUnalignedType() const override
uint32_t getCountLiveRanges() const override
uint32_t getSamplerSlot() const override
std::unique_ptr< PDBSymbolTypeBuiltin > getVirtualBaseTableType() const override
bool hasDebugInfo() const override
bool hasFarReturn() const override
uint32_t getRelativeVirtualAddress() const override
PDB_MemberAccess
Definition: PDBTypes.h:323
void resize(size_type N)
Definition: SmallVector.h:344