LLVM  8.0.0svn
DIARawSymbol.cpp
Go to the documentation of this file.
1 //===- DIARawSymbol.cpp - DIA implementation of IPDBRawSymbol ---*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
11 #include "llvm/ADT/ArrayRef.h"
12 #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  CComBSTR Result16;
119  if (S_OK != (Symbol->*Method)(&Result16))
120  return std::string();
121 
122  const char *SrcBytes = reinterpret_cast<const char *>(Result16.m_str);
123  llvm::ArrayRef<char> SrcByteArray(SrcBytes, Result16.ByteLength());
124  std::string Result8;
125  if (!llvm::convertUTF16ToUTF8String(SrcByteArray, Result8))
126  return std::string();
127  return Result8;
128 }
129 
131 PrivateGetDIAValue(IDiaSymbol *Symbol,
132  HRESULT (__stdcall IDiaSymbol::*Method)(GUID *)) {
133  GUID Result;
134  if (S_OK != (Symbol->*Method)(&Result))
135  return codeview::GUID();
136 
137  static_assert(sizeof(codeview::GUID) == sizeof(GUID),
138  "GUID is the wrong size!");
139  codeview::GUID IdResult;
140  ::memcpy(&IdResult, &Result, sizeof(GUID));
141  return IdResult;
142 }
143 
144 template <typename PrintType, typename ArgType>
145 void DumpDIAValueAs(llvm::raw_ostream &OS, int Indent, StringRef Name,
146  IDiaSymbol *Symbol,
147  HRESULT (__stdcall IDiaSymbol::*Method)(ArgType *)) {
148  ArgType Value;
149  if (S_OK == (Symbol->*Method)(&Value))
150  dumpSymbolField(OS, Name, static_cast<PrintType>(Value), Indent);
151 }
152 
153 void DumpDIAIdValue(llvm::raw_ostream &OS, int Indent, StringRef Name,
154  IDiaSymbol *Symbol,
155  HRESULT (__stdcall IDiaSymbol::*Method)(DWORD *),
156  const IPDBSession &Session, PdbSymbolIdField FieldId,
157  PdbSymbolIdField ShowFlags, PdbSymbolIdField RecurseFlags) {
158  DWORD Value;
159  if (S_OK == (Symbol->*Method)(&Value))
160  dumpSymbolIdField(OS, Name, Value, Indent, Session, FieldId, ShowFlags,
161  RecurseFlags);
162 }
163 
164 template <typename ArgType>
165 void DumpDIAValue(llvm::raw_ostream &OS, int Indent, StringRef Name,
166  IDiaSymbol *Symbol,
167  HRESULT (__stdcall IDiaSymbol::*Method)(ArgType *)) {
168  ArgType Value;
169  if (S_OK == (Symbol->*Method)(&Value))
170  dumpSymbolField(OS, Name, Value, Indent);
171 }
172 
173 void DumpDIAValue(llvm::raw_ostream &OS, int Indent, StringRef Name,
174  IDiaSymbol *Symbol,
175  HRESULT (__stdcall IDiaSymbol::*Method)(BSTR *)) {
176  BSTR Value = nullptr;
177  if (S_OK != (Symbol->*Method)(&Value))
178  return;
179  const char *Bytes = reinterpret_cast<const char *>(Value);
180  ArrayRef<char> ByteArray(Bytes, ::SysStringByteLen(Value));
181  std::string Result;
182  if (llvm::convertUTF16ToUTF8String(ByteArray, Result))
183  dumpSymbolField(OS, Name, Result, Indent);
184  ::SysFreeString(Value);
185 }
186 
187 void DumpDIAValue(llvm::raw_ostream &OS, int Indent, StringRef Name,
188  IDiaSymbol *Symbol,
189  HRESULT (__stdcall IDiaSymbol::*Method)(VARIANT *)) {
190  VARIANT Value;
191  Value.vt = VT_EMPTY;
192  if (S_OK != (Symbol->*Method)(&Value))
193  return;
194  Variant V = VariantFromVARIANT(Value);
195 
196  dumpSymbolField(OS, Name, V, Indent);
197 }
198 } // namespace
199 
200 namespace llvm {
202  StringRef GuidBytes(reinterpret_cast<const char *>(&G), sizeof(G));
203  codeview::detail::GuidAdapter A(GuidBytes);
204  A.format(OS, "");
205  return OS;
206 }
207 } // namespace llvm
208 
210  CComPtr<IDiaSymbol> DiaSymbol)
211  : Session(PDBSession), Symbol(DiaSymbol) {}
212 
213 #define RAW_ID_METHOD_DUMP(Stream, Method, Session, FieldId, ShowFlags, \
214  RecurseFlags) \
215  DumpDIAIdValue(Stream, Indent, StringRef{#Method}, Symbol, \
216  &IDiaSymbol::get_##Method, Session, FieldId, ShowFlags, \
217  RecurseFlags);
218 
219 #define RAW_METHOD_DUMP(Stream, Method) \
220  DumpDIAValue(Stream, Indent, StringRef{#Method}, Symbol, \
221  &IDiaSymbol::get_##Method);
222 
223 #define RAW_METHOD_DUMP_AS(Stream, Method, Type) \
224  DumpDIAValueAs<Type>(Stream, Indent, StringRef{#Method}, Symbol, \
225  &IDiaSymbol::get_##Method);
226 
227 void DIARawSymbol::dump(raw_ostream &OS, int Indent,
228  PdbSymbolIdField ShowIdFields,
229  PdbSymbolIdField RecurseIdFields) const {
230  RAW_ID_METHOD_DUMP(OS, symIndexId, Session, PdbSymbolIdField::SymIndexId,
231  ShowIdFields, RecurseIdFields);
232  RAW_METHOD_DUMP_AS(OS, symTag, PDB_SymType);
233 
234  RAW_METHOD_DUMP(OS, access);
235  RAW_METHOD_DUMP(OS, addressOffset);
236  RAW_METHOD_DUMP(OS, addressSection);
237  RAW_METHOD_DUMP(OS, age);
238  RAW_METHOD_DUMP(OS, arrayIndexTypeId);
239  RAW_METHOD_DUMP(OS, backEndMajor);
240  RAW_METHOD_DUMP(OS, backEndMinor);
241  RAW_METHOD_DUMP(OS, backEndBuild);
242  RAW_METHOD_DUMP(OS, backEndQFE);
243  RAW_METHOD_DUMP(OS, baseDataOffset);
244  RAW_METHOD_DUMP(OS, baseDataSlot);
245  RAW_METHOD_DUMP(OS, baseSymbolId);
246  RAW_METHOD_DUMP_AS(OS, baseType, PDB_BuiltinType);
247  RAW_METHOD_DUMP(OS, bitPosition);
248  RAW_METHOD_DUMP_AS(OS, callingConvention, PDB_CallingConv);
249  RAW_ID_METHOD_DUMP(OS, classParentId, Session, PdbSymbolIdField::ClassParent,
250  ShowIdFields, RecurseIdFields);
251  RAW_METHOD_DUMP(OS, compilerName);
252  RAW_METHOD_DUMP(OS, count);
253  RAW_METHOD_DUMP(OS, countLiveRanges);
254  RAW_METHOD_DUMP(OS, frontEndMajor);
255  RAW_METHOD_DUMP(OS, frontEndMinor);
256  RAW_METHOD_DUMP(OS, frontEndBuild);
257  RAW_METHOD_DUMP(OS, frontEndQFE);
258  RAW_ID_METHOD_DUMP(OS, lexicalParentId, Session,
259  PdbSymbolIdField::LexicalParent, ShowIdFields,
260  RecurseIdFields);
261  RAW_METHOD_DUMP(OS, libraryName);
262  RAW_METHOD_DUMP(OS, liveRangeStartAddressOffset);
263  RAW_METHOD_DUMP(OS, liveRangeStartAddressSection);
264  RAW_METHOD_DUMP(OS, liveRangeStartRelativeVirtualAddress);
265  RAW_METHOD_DUMP(OS, localBasePointerRegisterId);
266  RAW_METHOD_DUMP(OS, lowerBoundId);
267  RAW_METHOD_DUMP(OS, memorySpaceKind);
268  RAW_METHOD_DUMP(OS, name);
269  RAW_METHOD_DUMP(OS, numberOfAcceleratorPointerTags);
270  RAW_METHOD_DUMP(OS, numberOfColumns);
271  RAW_METHOD_DUMP(OS, numberOfModifiers);
272  RAW_METHOD_DUMP(OS, numberOfRegisterIndices);
273  RAW_METHOD_DUMP(OS, numberOfRows);
274  RAW_METHOD_DUMP(OS, objectFileName);
275  RAW_METHOD_DUMP(OS, oemId);
276  RAW_METHOD_DUMP(OS, oemSymbolId);
277  RAW_METHOD_DUMP(OS, offsetInUdt);
278  RAW_METHOD_DUMP(OS, platform);
279  RAW_METHOD_DUMP(OS, rank);
280  RAW_METHOD_DUMP(OS, registerId);
281  RAW_METHOD_DUMP(OS, registerType);
282  RAW_METHOD_DUMP(OS, relativeVirtualAddress);
283  RAW_METHOD_DUMP(OS, samplerSlot);
284  RAW_METHOD_DUMP(OS, signature);
285  RAW_METHOD_DUMP(OS, sizeInUdt);
286  RAW_METHOD_DUMP(OS, slot);
287  RAW_METHOD_DUMP(OS, sourceFileName);
288  RAW_METHOD_DUMP(OS, stride);
289  RAW_METHOD_DUMP(OS, subTypeId);
290  RAW_METHOD_DUMP(OS, symbolsFileName);
291  RAW_METHOD_DUMP(OS, targetOffset);
292  RAW_METHOD_DUMP(OS, targetRelativeVirtualAddress);
293  RAW_METHOD_DUMP(OS, targetVirtualAddress);
294  RAW_METHOD_DUMP(OS, targetSection);
295  RAW_METHOD_DUMP(OS, textureSlot);
296  RAW_METHOD_DUMP(OS, timeStamp);
297  RAW_METHOD_DUMP(OS, token);
298  RAW_ID_METHOD_DUMP(OS, typeId, Session, PdbSymbolIdField::Type, ShowIdFields,
299  RecurseIdFields);
300  RAW_METHOD_DUMP(OS, uavSlot);
301  RAW_METHOD_DUMP(OS, undecoratedName);
302  RAW_ID_METHOD_DUMP(OS, unmodifiedTypeId, Session,
303  PdbSymbolIdField::UnmodifiedType, ShowIdFields,
304  RecurseIdFields);
305  RAW_METHOD_DUMP(OS, upperBoundId);
306  RAW_METHOD_DUMP(OS, virtualBaseDispIndex);
307  RAW_METHOD_DUMP(OS, virtualBaseOffset);
308  RAW_METHOD_DUMP(OS, virtualTableShapeId);
309  RAW_METHOD_DUMP_AS(OS, dataKind, PDB_DataKind);
310  RAW_METHOD_DUMP(OS, guid);
311  RAW_METHOD_DUMP(OS, offset);
312  RAW_METHOD_DUMP(OS, thisAdjust);
313  RAW_METHOD_DUMP(OS, virtualBasePointerOffset);
314  RAW_METHOD_DUMP_AS(OS, locationType, PDB_LocType);
315  RAW_METHOD_DUMP(OS, machineType);
316  RAW_METHOD_DUMP(OS, thunkOrdinal);
317  RAW_METHOD_DUMP(OS, length);
318  RAW_METHOD_DUMP(OS, liveRangeLength);
319  RAW_METHOD_DUMP(OS, virtualAddress);
320  RAW_METHOD_DUMP_AS(OS, udtKind, PDB_UdtType);
321  RAW_METHOD_DUMP(OS, constructor);
322  RAW_METHOD_DUMP(OS, customCallingConvention);
323  RAW_METHOD_DUMP(OS, farReturn);
324  RAW_METHOD_DUMP(OS, code);
325  RAW_METHOD_DUMP(OS, compilerGenerated);
326  RAW_METHOD_DUMP(OS, constType);
327  RAW_METHOD_DUMP(OS, editAndContinueEnabled);
328  RAW_METHOD_DUMP(OS, function);
329  RAW_METHOD_DUMP(OS, stride);
330  RAW_METHOD_DUMP(OS, noStackOrdering);
333  RAW_METHOD_DUMP(OS, isCTypes);
336  RAW_METHOD_DUMP(OS, hasEH);
337  RAW_METHOD_DUMP(OS, hasEHa);
339  RAW_METHOD_DUMP(OS, framePointerPresent);
340  RAW_METHOD_DUMP(OS, inlSpec);
341  RAW_METHOD_DUMP(OS, interruptReturn);
345  RAW_METHOD_DUMP(OS, noInline);
346  RAW_METHOD_DUMP(OS, noReturn);
347  RAW_METHOD_DUMP(OS, optimizedCodeDebugInfo);
348  RAW_METHOD_DUMP(OS, overloadedOperator);
349  RAW_METHOD_DUMP(OS, hasSEH);
352  RAW_METHOD_DUMP(OS, strictGSCheck);
357  RAW_METHOD_DUMP(OS, intro);
364  RAW_METHOD_DUMP(OS, indirectVirtualBaseClass);
366  RAW_METHOD_DUMP(OS, intrinsic);
367  RAW_METHOD_DUMP(OS, isLTCG);
371  RAW_METHOD_DUMP(OS, managed);
372  RAW_METHOD_DUMP(OS, msil);
375  RAW_METHOD_DUMP(OS, nested);
377  RAW_METHOD_DUMP(OS, packed);
381  RAW_METHOD_DUMP(OS, pure);
382  RAW_METHOD_DUMP(OS, RValueReference);
384  RAW_METHOD_DUMP(OS, reference);
385  RAW_METHOD_DUMP(OS, restrictedType);
388  RAW_METHOD_DUMP(OS, scoped);
389  RAW_METHOD_DUMP(OS, isSdl);
393  RAW_METHOD_DUMP(OS, isStripped);
394  RAW_METHOD_DUMP(OS, unalignedType);
395  RAW_METHOD_DUMP(OS, notReached);
397  RAW_METHOD_DUMP(OS, virtual);
398  RAW_METHOD_DUMP(OS, virtualBaseClass);
400  RAW_METHOD_DUMP(OS, volatileType);
402  RAW_METHOD_DUMP(OS, unused);
403  RAW_METHOD_DUMP(OS, value);
404 }
405 
406 std::unique_ptr<IPDBEnumSymbols>
408  enum SymTagEnum EnumVal = static_cast<enum SymTagEnum>(Type);
409 
410  CComPtr<IDiaEnumSymbols> DiaEnumerator;
411  if (S_OK !=
412  Symbol->findChildrenEx(EnumVal, nullptr, nsNone, &DiaEnumerator)) {
413  if (S_OK != Symbol->findChildren(EnumVal, nullptr, nsNone, &DiaEnumerator))
414  return nullptr;
415  }
416 
417  return llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
418 }
419 
420 std::unique_ptr<IPDBEnumSymbols>
422  PDB_NameSearchFlags Flags) const {
424  llvm::convertUTF8ToUTF16String(Name, Name16);
425 
426  enum SymTagEnum EnumVal = static_cast<enum SymTagEnum>(Type);
427  DWORD CompareFlags = static_cast<DWORD>(Flags);
428  wchar_t *Name16Str = reinterpret_cast<wchar_t *>(Name16.data());
429 
430  CComPtr<IDiaEnumSymbols> DiaEnumerator;
431  if (S_OK !=
432  Symbol->findChildrenEx(EnumVal, Name16Str, CompareFlags, &DiaEnumerator))
433  return nullptr;
434 
435  return llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
436 }
437 
438 std::unique_ptr<IPDBEnumSymbols>
441  uint32_t Offset) const {
443  llvm::convertUTF8ToUTF16String(Name, Name16);
444 
445  enum SymTagEnum EnumVal = static_cast<enum SymTagEnum>(Type);
446 
447  DWORD CompareFlags = static_cast<DWORD>(Flags);
448  wchar_t *Name16Str = reinterpret_cast<wchar_t *>(Name16.data());
449 
450  CComPtr<IDiaEnumSymbols> DiaEnumerator;
451  if (S_OK != Symbol->findChildrenExByAddr(EnumVal, Name16Str, CompareFlags,
452  Section, Offset, &DiaEnumerator))
453  return nullptr;
454 
455  return llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
456 }
457 
458 std::unique_ptr<IPDBEnumSymbols>
460  PDB_NameSearchFlags Flags, uint64_t VA) const {
462  llvm::convertUTF8ToUTF16String(Name, Name16);
463 
464  enum SymTagEnum EnumVal = static_cast<enum SymTagEnum>(Type);
465 
466  DWORD CompareFlags = static_cast<DWORD>(Flags);
467  wchar_t *Name16Str = reinterpret_cast<wchar_t *>(Name16.data());
468 
469  CComPtr<IDiaEnumSymbols> DiaEnumerator;
470  if (S_OK != Symbol->findChildrenExByVA(EnumVal, Name16Str, CompareFlags, VA,
471  &DiaEnumerator))
472  return nullptr;
473 
474  return llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
475 }
476 
477 std::unique_ptr<IPDBEnumSymbols>
479  PDB_NameSearchFlags Flags, uint32_t RVA) const {
481  llvm::convertUTF8ToUTF16String(Name, Name16);
482 
483  enum SymTagEnum EnumVal = static_cast<enum SymTagEnum>(Type);
484  DWORD CompareFlags = static_cast<DWORD>(Flags);
485  wchar_t *Name16Str = reinterpret_cast<wchar_t *>(Name16.data());
486 
487  CComPtr<IDiaEnumSymbols> DiaEnumerator;
488  if (S_OK != Symbol->findChildrenExByRVA(EnumVal, Name16Str, CompareFlags, RVA,
489  &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->findInlineFramesByAddr(Section, Offset, &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->findInlineFramesByRVA(RVA, &DiaEnumerator))
508  return nullptr;
509 
510  return llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
511 }
512 
513 std::unique_ptr<IPDBEnumSymbols>
515  CComPtr<IDiaEnumSymbols> DiaEnumerator;
516  if (S_OK != Symbol->findInlineFramesByVA(VA, &DiaEnumerator))
517  return nullptr;
518 
519  return llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
520 }
521 
522 std::unique_ptr<IPDBEnumLineNumbers> DIARawSymbol::findInlineeLines() const {
523  CComPtr<IDiaEnumLineNumbers> DiaEnumerator;
524  if (S_OK != Symbol->findInlineeLines(&DiaEnumerator))
525  return nullptr;
526 
527  return llvm::make_unique<DIAEnumLineNumbers>(DiaEnumerator);
528 }
529 
530 std::unique_ptr<IPDBEnumLineNumbers>
532  uint32_t Length) const {
533  CComPtr<IDiaEnumLineNumbers> DiaEnumerator;
534  if (S_OK !=
535  Symbol->findInlineeLinesByAddr(Section, Offset, Length, &DiaEnumerator))
536  return nullptr;
537 
538  return llvm::make_unique<DIAEnumLineNumbers>(DiaEnumerator);
539 }
540 
541 std::unique_ptr<IPDBEnumLineNumbers>
543  CComPtr<IDiaEnumLineNumbers> DiaEnumerator;
544  if (S_OK != Symbol->findInlineeLinesByRVA(RVA, Length, &DiaEnumerator))
545  return nullptr;
546 
547  return llvm::make_unique<DIAEnumLineNumbers>(DiaEnumerator);
548 }
549 
550 std::unique_ptr<IPDBEnumLineNumbers>
551 DIARawSymbol::findInlineeLinesByVA(uint64_t VA, uint32_t Length) const {
552  CComPtr<IDiaEnumLineNumbers> DiaEnumerator;
553  if (S_OK != Symbol->findInlineeLinesByVA(VA, Length, &DiaEnumerator))
554  return nullptr;
555 
556  return llvm::make_unique<DIAEnumLineNumbers>(DiaEnumerator);
557 }
558 
560  bytes.clear();
561 
562  DWORD DataSize = 0;
563  Symbol->get_dataBytes(0, &DataSize, nullptr);
564  if (DataSize == 0)
565  return;
566 
567  bytes.resize(DataSize);
568  Symbol->get_dataBytes(DataSize, &DataSize, bytes.data());
569 }
570 
572  CComBSTR Result16;
573  if (S_OK != Symbol->get_undecoratedNameEx((DWORD)Flags, &Result16))
574  return std::string();
575 
576  const char *SrcBytes = reinterpret_cast<const char *>(Result16.m_str);
577  llvm::ArrayRef<char> SrcByteArray(SrcBytes, Result16.ByteLength());
578  std::string Result8;
579  if (!llvm::convertUTF16ToUTF8String(SrcByteArray, Result8))
580  return std::string();
581  return Result8;
582 }
583 
585  return PrivateGetDIAValue<DWORD, PDB_MemberAccess>(Symbol,
586  &IDiaSymbol::get_access);
587 }
588 
590  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_addressOffset);
591 }
592 
594  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_addressSection);
595 }
596 
598  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_age);
599 }
600 
602  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_arrayIndexTypeId);
603 }
604 
606  Version.Major = PrivateGetDIAValue(Symbol, &IDiaSymbol::get_backEndMajor);
607  Version.Minor = PrivateGetDIAValue(Symbol, &IDiaSymbol::get_backEndMinor);
608  Version.Build = PrivateGetDIAValue(Symbol, &IDiaSymbol::get_backEndBuild);
609  Version.QFE = PrivateGetDIAValue(Symbol, &IDiaSymbol::get_backEndQFE);
610 }
611 
613  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_baseDataOffset);
614 }
615 
617  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_baseDataSlot);
618 }
619 
621  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_baseSymbolId);
622 }
623 
625  return PrivateGetDIAValue<DWORD, PDB_BuiltinType>(Symbol,
626  &IDiaSymbol::get_baseType);
627 }
628 
630  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_bitPosition);
631 }
632 
634  return PrivateGetDIAValue<DWORD, PDB_CallingConv>(
635  Symbol, &IDiaSymbol::get_callingConvention);
636 }
637 
639  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_classParentId);
640 }
641 
642 std::string DIARawSymbol::getCompilerName() const {
643  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_compilerName);
644 }
645 
647  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_count);
648 }
649 
651  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_countLiveRanges);
652 }
653 
655  Version.Major = PrivateGetDIAValue(Symbol, &IDiaSymbol::get_frontEndMajor);
656  Version.Minor = PrivateGetDIAValue(Symbol, &IDiaSymbol::get_frontEndMinor);
657  Version.Build = PrivateGetDIAValue(Symbol, &IDiaSymbol::get_frontEndBuild);
658  Version.QFE = PrivateGetDIAValue(Symbol, &IDiaSymbol::get_frontEndQFE);
659 }
660 
662  return PrivateGetDIAValue<DWORD, PDB_Lang>(Symbol, &IDiaSymbol::get_language);
663 }
664 
666  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_lexicalParentId);
667 }
668 
669 std::string DIARawSymbol::getLibraryName() const {
670  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_libraryName);
671 }
672 
674  return PrivateGetDIAValue(Symbol,
675  &IDiaSymbol::get_liveRangeStartAddressOffset);
676 }
677 
679  return PrivateGetDIAValue(Symbol,
680  &IDiaSymbol::get_liveRangeStartAddressSection);
681 }
682 
684  return PrivateGetDIAValue(
685  Symbol, &IDiaSymbol::get_liveRangeStartRelativeVirtualAddress);
686 }
687 
689  return PrivateGetDIAValue<DWORD, codeview::RegisterId>(
690  Symbol, &IDiaSymbol::get_localBasePointerRegisterId);
691 }
692 
694  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_lowerBoundId);
695 }
696 
698  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_memorySpaceKind);
699 }
700 
701 std::string DIARawSymbol::getName() const {
702  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_name);
703 }
704 
706  return PrivateGetDIAValue(Symbol,
707  &IDiaSymbol::get_numberOfAcceleratorPointerTags);
708 }
709 
711  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_numberOfColumns);
712 }
713 
715  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_numberOfModifiers);
716 }
717 
719  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_numberOfRegisterIndices);
720 }
721 
723  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_numberOfRows);
724 }
725 
726 std::string DIARawSymbol::getObjectFileName() const {
727  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_objectFileName);
728 }
729 
731  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_oemId);
732 }
733 
735  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_oemSymbolId);
736 }
737 
739  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_offsetInUdt);
740 }
741 
743  return PrivateGetDIAValue<DWORD, PDB_Cpu>(Symbol, &IDiaSymbol::get_platform);
744 }
745 
747  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_rank);
748 }
749 
751  return PrivateGetDIAValue<DWORD, codeview::RegisterId>(
752  Symbol, &IDiaSymbol::get_registerId);
753 }
754 
756  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_registerType);
757 }
758 
760  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_relativeVirtualAddress);
761 }
762 
764  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_samplerSlot);
765 }
766 
768  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_signature);
769 }
770 
772  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_sizeInUdt);
773 }
774 
776  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_slot);
777 }
778 
779 std::string DIARawSymbol::getSourceFileName() const {
780  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_sourceFileName);
781 }
782 
783 std::unique_ptr<IPDBLineNumber> DIARawSymbol::getSrcLineOnTypeDefn() const {
784  CComPtr<IDiaLineNumber> LineNumber;
785  if (FAILED(Symbol->getSrcLineOnTypeDefn(&LineNumber)) || !LineNumber)
786  return nullptr;
787 
788  return llvm::make_unique<DIALineNumber>(LineNumber);
789 }
790 
792  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_stride);
793 }
794 
796  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_subTypeId);
797 }
798 
799 std::string DIARawSymbol::getSymbolsFileName() const {
800  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_symbolsFileName);
801 }
802 
804  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_symIndexId);
805 }
806 
808  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_targetOffset);
809 }
810 
812  return PrivateGetDIAValue(Symbol,
813  &IDiaSymbol::get_targetRelativeVirtualAddress);
814 }
815 
817  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_targetVirtualAddress);
818 }
819 
821  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_targetSection);
822 }
823 
825  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_textureSlot);
826 }
827 
829  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_timeStamp);
830 }
831 
833  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_token);
834 }
835 
837  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_typeId);
838 }
839 
841  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_uavSlot);
842 }
843 
844 std::string DIARawSymbol::getUndecoratedName() const {
845  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_undecoratedName);
846 }
847 
849  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_unmodifiedTypeId);
850 }
851 
853  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_upperBoundId);
854 }
855 
857  VARIANT Value;
858  Value.vt = VT_EMPTY;
859  if (S_OK != Symbol->get_value(&Value))
860  return Variant();
861 
862  return VariantFromVARIANT(Value);
863 }
864 
866  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtualBaseDispIndex);
867 }
868 
870  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtualBaseOffset);
871 }
872 
874  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtualTableShapeId);
875 }
876 
877 std::unique_ptr<PDBSymbolTypeBuiltin>
879  CComPtr<IDiaSymbol> TableType;
880  if (FAILED(Symbol->get_virtualBaseTableType(&TableType)) || !TableType)
881  return nullptr;
882 
883  auto RawVT = llvm::make_unique<DIARawSymbol>(Session, TableType);
884  auto Pointer =
885  PDBSymbol::createAs<PDBSymbolTypePointer>(Session, std::move(RawVT));
886  return unique_dyn_cast<PDBSymbolTypeBuiltin>(Pointer->getPointeeType());
887 }
888 
890  return PrivateGetDIAValue<DWORD, PDB_DataKind>(Symbol,
891  &IDiaSymbol::get_dataKind);
892 }
893 
895  return PrivateGetDIAValue<DWORD, PDB_SymType>(Symbol,
896  &IDiaSymbol::get_symTag);
897 }
898 
900  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_guid);
901 }
902 
903 int32_t DIARawSymbol::getOffset() const {
904  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_offset);
905 }
906 
908  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_thisAdjust);
909 }
910 
912  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtualBasePointerOffset);
913 }
914 
916  return PrivateGetDIAValue<DWORD, PDB_LocType>(Symbol,
917  &IDiaSymbol::get_locationType);
918 }
919 
921  return PrivateGetDIAValue<DWORD, PDB_Machine>(Symbol,
922  &IDiaSymbol::get_machineType);
923 }
924 
926  return PrivateGetDIAValue<DWORD, codeview::ThunkOrdinal>(
927  Symbol, &IDiaSymbol::get_thunkOrdinal);
928 }
929 
930 uint64_t DIARawSymbol::getLength() const {
931  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_length);
932 }
933 
935  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_liveRangeLength);
936 }
937 
939  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtualAddress);
940 }
941 
943  return PrivateGetDIAValue<DWORD, PDB_UdtType>(Symbol,
944  &IDiaSymbol::get_udtKind);
945 }
946 
948  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_constructor);
949 }
950 
952  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_customCallingConvention);
953 }
954 
956  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_farReturn);
957 }
958 
959 bool DIARawSymbol::isCode() const {
960  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_code);
961 }
962 
964  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_compilerGenerated);
965 }
966 
968  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_constType);
969 }
970 
972  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_editAndContinueEnabled);
973 }
974 
976  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_function);
977 }
978 
980  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_addressTaken);
981 }
982 
984  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_noStackOrdering);
985 }
986 
988  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasAlloca);
989 }
990 
992  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasAssignmentOperator);
993 }
994 
996  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isCTypes);
997 }
998 
1000  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasCastOperator);
1001 }
1002 
1004  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasDebugInfo);
1005 }
1006 
1007 bool DIARawSymbol::hasEH() const {
1008  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasEH);
1009 }
1010 
1011 bool DIARawSymbol::hasEHa() const {
1012  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasEHa);
1013 }
1014 
1016  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasInlAsm);
1017 }
1018 
1020  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_inlSpec);
1021 }
1022 
1024  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_interruptReturn);
1025 }
1026 
1028  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_framePointerPresent);
1029 }
1030 
1032  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasLongJump);
1033 }
1034 
1036  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasManagedCode);
1037 }
1038 
1040  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasNestedTypes);
1041 }
1042 
1044  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_noInline);
1045 }
1046 
1048  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_noReturn);
1049 }
1050 
1052  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_optimizedCodeDebugInfo);
1053 }
1054 
1056  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_overloadedOperator);
1057 }
1058 
1059 bool DIARawSymbol::hasSEH() const {
1060  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasSEH);
1061 }
1062 
1064  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasSecurityChecks);
1065 }
1066 
1068  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasSetJump);
1069 }
1070 
1072  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_strictGSCheck);
1073 }
1074 
1076  return PrivateGetDIAValue(Symbol,
1077  &IDiaSymbol::get_isAcceleratorGroupSharedLocal);
1078 }
1079 
1081  return PrivateGetDIAValue(Symbol,
1082  &IDiaSymbol::get_isAcceleratorPointerTagLiveRange);
1083 }
1084 
1086  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isAcceleratorStubFunction);
1087 }
1088 
1090  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isAggregated);
1091 }
1092 
1094  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_intro);
1095 }
1096 
1098  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isCVTCIL);
1099 }
1100 
1102  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isConstructorVirtualBase);
1103 }
1104 
1106  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isCxxReturnUdt);
1107 }
1108 
1110  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isDataAligned);
1111 }
1112 
1114  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isHLSLData);
1115 }
1116 
1118  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isHotpatchable);
1119 }
1120 
1122  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_indirectVirtualBaseClass);
1123 }
1124 
1126  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isInterfaceUdt);
1127 }
1128 
1130  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_intrinsic);
1131 }
1132 
1133 bool DIARawSymbol::isLTCG() const {
1134  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isLTCG);
1135 }
1136 
1138  return PrivateGetDIAValue(Symbol,
1139  &IDiaSymbol::get_isLocationControlFlowDependent);
1140 }
1141 
1143  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isMSILNetmodule);
1144 }
1145 
1147  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isMatrixRowMajor);
1148 }
1149 
1151  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_managed);
1152 }
1153 
1155  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_msil);
1156 }
1157 
1159  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isMultipleInheritance);
1160 }
1161 
1163  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isNaked);
1164 }
1165 
1167  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_nested);
1168 }
1169 
1171  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isOptimizedAway);
1172 }
1173 
1175  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_packed);
1176 }
1177 
1179  return PrivateGetDIAValue(Symbol,
1180  &IDiaSymbol::get_isPointerBasedOnSymbolValue);
1181 }
1182 
1184  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isPointerToDataMember);
1185 }
1186 
1188  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isPointerToMemberFunction);
1189 }
1190 
1192  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_pure);
1193 }
1194 
1196  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_RValueReference);
1197 }
1198 
1200  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isRefUdt);
1201 }
1202 
1204  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_reference);
1205 }
1206 
1208  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_restrictedType);
1209 }
1210 
1212  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isReturnValue);
1213 }
1214 
1216  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isSafeBuffers);
1217 }
1218 
1220  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_scoped);
1221 }
1222 
1223 bool DIARawSymbol::isSdl() const {
1224  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isSdl);
1225 }
1226 
1228  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isSingleInheritance);
1229 }
1230 
1232  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isSplitted);
1233 }
1234 
1236  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isStatic);
1237 }
1238 
1240  // hasPrivateSymbols is the opposite of isStripped, but we expose
1241  // hasPrivateSymbols as a more intuitive interface.
1242  return !PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isStripped);
1243 }
1244 
1246  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_unalignedType);
1247 }
1248 
1250  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_notReached);
1251 }
1252 
1254  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isValueUdt);
1255 }
1256 
1258  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtual);
1259 }
1260 
1262  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtualBaseClass);
1263 }
1264 
1266  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isVirtualInheritance);
1267 }
1268 
1270  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_volatileType);
1271 }
1272 
1274  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_wasInlined);
1275 }
1276 
1277 std::string DIARawSymbol::getUnused() const {
1278  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_unused);
1279 }
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:26
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
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
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
uint32_t getTargetOffset() const override
LLVM_NODISCARD auto unique_dyn_cast(std::unique_ptr< Y > &Val) -> decltype(cast< X >(Val))
Definition: Casting.h:368
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:236
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:99
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:25
bool hasCastOperator() const override
uint32_t getStride() const override
union llvm::pdb::Variant::@200 Value
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:27
SymIndexId getUnmodifiedTypeId() const override
This represents the &#39;GUID&#39; type from windows.h.
Definition: GUID.h:22
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
ArgType PrivateGetDIAValue(IDiaSectionContrib *Section, HRESULT(__stdcall IDiaSectionContrib::*Method)(ArgType *))
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:33
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:287
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:1108
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:181
uint32_t getRank() const override
PDB_MemberAccess getAccess() const override
uint32_t UInt32
Definition: PDBTypes.h:389
bool getAddressTaken() const override
uint32_t getTargetSection() const override
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:46
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:166
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:49
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:186
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:218
uint32_t getTargetRelativeVirtualAddress() const override
uint64_t UInt64
Definition: PDBTypes.h:390
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:144
bool hasSEH() const override
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:847
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:79
int32_t getThisAdjust() const override
std::string getLibraryName() const override
const DataFlowGraph & G
Definition: RDFGraph.cpp:211
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:149
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:388
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:516
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:261
Definition: JSON.cpp:592
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:73
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:46
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:49
Variant getValue() const override
bool isSingleInheritance() const override
uint32_t getLiveRangeStartAddressSection() const override
PDB_Lang getLanguage() const override
PDB_VariantType Type
Definition: PDBTypes.h:378
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:867
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:895
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:310
void resize(size_type N)
Definition: SmallVector.h:351