LLVM  8.0.1
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"
26 
27 using namespace llvm;
28 using namespace llvm::pdb;
29 
30 namespace {
31 Variant VariantFromVARIANT(const VARIANT &V) {
33  switch (V.vt) {
34  case VT_I1:
35  Result.Value.Int8 = V.cVal;
36  Result.Type = PDB_VariantType::Int8;
37  break;
38  case VT_I2:
39  Result.Value.Int16 = V.iVal;
41  break;
42  case VT_I4:
43  Result.Value.Int32 = V.intVal;
45  break;
46  case VT_I8:
47  Result.Value.Int64 = V.llVal;
49  break;
50  case VT_UI1:
51  Result.Value.UInt8 = V.bVal;
53  break;
54  case VT_UI2:
55  Result.Value.UInt16 = V.uiVal;
57  break;
58  case VT_UI4:
59  Result.Value.UInt32 = V.uintVal;
61  break;
62  case VT_UI8:
63  Result.Value.UInt64 = V.ullVal;
65  break;
66  case VT_BOOL:
67  Result.Value.Bool = (V.boolVal == VARIANT_TRUE) ? true : false;
68  Result.Type = PDB_VariantType::Bool;
69  break;
70  case VT_R4:
71  Result.Value.Single = V.fltVal;
73  break;
74  case VT_R8:
75  Result.Value.Double = V.dblVal;
77  break;
78  case VT_BSTR: {
79  const char *SrcBytes = reinterpret_cast<const char *>(V.bstrVal);
80  llvm::ArrayRef<char> SrcByteArray(SrcBytes, SysStringByteLen(V.bstrVal));
81  std::string Result8;
82  if (!llvm::convertUTF16ToUTF8String(SrcByteArray, Result8))
83  Result.Value.String = nullptr;
84  Result.Value.String = new char[Result8.length() + 1];
85  ::strcpy(Result.Value.String, Result8.c_str());
87  break;
88  }
89  default:
91  break;
92  }
93  return Result;
94 }
95 
96 template <typename ArgType>
97 ArgType PrivateGetDIAValue(IDiaSymbol *Symbol,
98  HRESULT (__stdcall IDiaSymbol::*Method)(ArgType *)) {
99  ArgType Value;
100  if (S_OK == (Symbol->*Method)(&Value))
101  return static_cast<ArgType>(Value);
102 
103  return ArgType();
104 }
105 
106 template <typename ArgType, typename RetType>
107 RetType PrivateGetDIAValue(IDiaSymbol *Symbol,
108  HRESULT (__stdcall IDiaSymbol::*Method)(ArgType *)) {
109  ArgType Value;
110  if (S_OK == (Symbol->*Method)(&Value))
111  return static_cast<RetType>(Value);
112 
113  return RetType();
114 }
115 
116 std::string
117 PrivateGetDIAValue(IDiaSymbol *Symbol,
118  HRESULT (__stdcall IDiaSymbol::*Method)(BSTR *)) {
119  return invokeBstrMethod(*Symbol, Method);
120 }
121 
123 PrivateGetDIAValue(IDiaSymbol *Symbol,
124  HRESULT (__stdcall IDiaSymbol::*Method)(GUID *)) {
125  GUID Result;
126  if (S_OK != (Symbol->*Method)(&Result))
127  return codeview::GUID();
128 
129  static_assert(sizeof(codeview::GUID) == sizeof(GUID),
130  "GUID is the wrong size!");
131  codeview::GUID IdResult;
132  ::memcpy(&IdResult, &Result, sizeof(GUID));
133  return IdResult;
134 }
135 
136 template <typename PrintType, typename ArgType>
137 void DumpDIAValueAs(llvm::raw_ostream &OS, int Indent, StringRef Name,
138  IDiaSymbol *Symbol,
139  HRESULT (__stdcall IDiaSymbol::*Method)(ArgType *)) {
140  ArgType Value;
141  if (S_OK == (Symbol->*Method)(&Value))
142  dumpSymbolField(OS, Name, static_cast<PrintType>(Value), Indent);
143 }
144 
145 void DumpDIAIdValue(llvm::raw_ostream &OS, int Indent, StringRef Name,
146  IDiaSymbol *Symbol,
147  HRESULT (__stdcall IDiaSymbol::*Method)(DWORD *),
148  const IPDBSession &Session, PdbSymbolIdField FieldId,
149  PdbSymbolIdField ShowFlags, PdbSymbolIdField RecurseFlags) {
150  DWORD Value;
151  if (S_OK == (Symbol->*Method)(&Value))
152  dumpSymbolIdField(OS, Name, Value, Indent, Session, FieldId, ShowFlags,
153  RecurseFlags);
154 }
155 
156 template <typename ArgType>
157 void DumpDIAValue(llvm::raw_ostream &OS, int Indent, StringRef Name,
158  IDiaSymbol *Symbol,
159  HRESULT (__stdcall IDiaSymbol::*Method)(ArgType *)) {
160  ArgType Value;
161  if (S_OK == (Symbol->*Method)(&Value))
162  dumpSymbolField(OS, Name, Value, Indent);
163 }
164 
165 void DumpDIAValue(llvm::raw_ostream &OS, int Indent, StringRef Name,
166  IDiaSymbol *Symbol,
167  HRESULT (__stdcall IDiaSymbol::*Method)(BSTR *)) {
168  BSTR Value = nullptr;
169  if (S_OK != (Symbol->*Method)(&Value))
170  return;
171  const char *Bytes = reinterpret_cast<const char *>(Value);
172  ArrayRef<char> ByteArray(Bytes, ::SysStringByteLen(Value));
173  std::string Result;
174  if (llvm::convertUTF16ToUTF8String(ByteArray, Result))
175  dumpSymbolField(OS, Name, Result, Indent);
176  ::SysFreeString(Value);
177 }
178 
179 void DumpDIAValue(llvm::raw_ostream &OS, int Indent, StringRef Name,
180  IDiaSymbol *Symbol,
181  HRESULT (__stdcall IDiaSymbol::*Method)(VARIANT *)) {
182  VARIANT Value;
183  Value.vt = VT_EMPTY;
184  if (S_OK != (Symbol->*Method)(&Value))
185  return;
186  Variant V = VariantFromVARIANT(Value);
187 
188  dumpSymbolField(OS, Name, V, Indent);
189 }
190 } // namespace
191 
192 namespace llvm {
194  StringRef GuidBytes(reinterpret_cast<const char *>(&G), sizeof(G));
195  codeview::detail::GuidAdapter A(GuidBytes);
196  A.format(OS, "");
197  return OS;
198 }
199 } // namespace llvm
200 
202  CComPtr<IDiaSymbol> DiaSymbol)
203  : Session(PDBSession), Symbol(DiaSymbol) {}
204 
205 #define RAW_ID_METHOD_DUMP(Stream, Method, Session, FieldId, ShowFlags, \
206  RecurseFlags) \
207  DumpDIAIdValue(Stream, Indent, StringRef{#Method}, Symbol, \
208  &IDiaSymbol::get_##Method, Session, FieldId, ShowFlags, \
209  RecurseFlags);
210 
211 #define RAW_METHOD_DUMP(Stream, Method) \
212  DumpDIAValue(Stream, Indent, StringRef{#Method}, Symbol, \
213  &IDiaSymbol::get_##Method);
214 
215 #define RAW_METHOD_DUMP_AS(Stream, Method, Type) \
216  DumpDIAValueAs<Type>(Stream, Indent, StringRef{#Method}, Symbol, \
217  &IDiaSymbol::get_##Method);
218 
219 void DIARawSymbol::dump(raw_ostream &OS, int Indent,
220  PdbSymbolIdField ShowIdFields,
221  PdbSymbolIdField RecurseIdFields) const {
222  RAW_ID_METHOD_DUMP(OS, symIndexId, Session, PdbSymbolIdField::SymIndexId,
223  ShowIdFields, RecurseIdFields);
224  RAW_METHOD_DUMP_AS(OS, symTag, PDB_SymType);
225 
226  RAW_METHOD_DUMP(OS, access);
227  RAW_METHOD_DUMP(OS, addressOffset);
228  RAW_METHOD_DUMP(OS, addressSection);
229  RAW_METHOD_DUMP(OS, age);
230  RAW_METHOD_DUMP(OS, arrayIndexTypeId);
231  RAW_METHOD_DUMP(OS, backEndMajor);
232  RAW_METHOD_DUMP(OS, backEndMinor);
233  RAW_METHOD_DUMP(OS, backEndBuild);
234  RAW_METHOD_DUMP(OS, backEndQFE);
235  RAW_METHOD_DUMP(OS, baseDataOffset);
236  RAW_METHOD_DUMP(OS, baseDataSlot);
237  RAW_METHOD_DUMP(OS, baseSymbolId);
238  RAW_METHOD_DUMP_AS(OS, baseType, PDB_BuiltinType);
239  RAW_METHOD_DUMP(OS, bitPosition);
240  RAW_METHOD_DUMP_AS(OS, callingConvention, PDB_CallingConv);
241  RAW_ID_METHOD_DUMP(OS, classParentId, Session, PdbSymbolIdField::ClassParent,
242  ShowIdFields, RecurseIdFields);
243  RAW_METHOD_DUMP(OS, compilerName);
244  RAW_METHOD_DUMP(OS, count);
245  RAW_METHOD_DUMP(OS, countLiveRanges);
246  RAW_METHOD_DUMP(OS, frontEndMajor);
247  RAW_METHOD_DUMP(OS, frontEndMinor);
248  RAW_METHOD_DUMP(OS, frontEndBuild);
249  RAW_METHOD_DUMP(OS, frontEndQFE);
250  RAW_ID_METHOD_DUMP(OS, lexicalParentId, Session,
251  PdbSymbolIdField::LexicalParent, ShowIdFields,
252  RecurseIdFields);
253  RAW_METHOD_DUMP(OS, libraryName);
254  RAW_METHOD_DUMP(OS, liveRangeStartAddressOffset);
255  RAW_METHOD_DUMP(OS, liveRangeStartAddressSection);
256  RAW_METHOD_DUMP(OS, liveRangeStartRelativeVirtualAddress);
257  RAW_METHOD_DUMP(OS, localBasePointerRegisterId);
258  RAW_METHOD_DUMP(OS, lowerBoundId);
259  RAW_METHOD_DUMP(OS, memorySpaceKind);
260  RAW_METHOD_DUMP(OS, name);
261  RAW_METHOD_DUMP(OS, numberOfAcceleratorPointerTags);
262  RAW_METHOD_DUMP(OS, numberOfColumns);
263  RAW_METHOD_DUMP(OS, numberOfModifiers);
264  RAW_METHOD_DUMP(OS, numberOfRegisterIndices);
265  RAW_METHOD_DUMP(OS, numberOfRows);
266  RAW_METHOD_DUMP(OS, objectFileName);
267  RAW_METHOD_DUMP(OS, oemId);
268  RAW_METHOD_DUMP(OS, oemSymbolId);
269  RAW_METHOD_DUMP(OS, offsetInUdt);
270  RAW_METHOD_DUMP(OS, platform);
271  RAW_METHOD_DUMP(OS, rank);
272  RAW_METHOD_DUMP(OS, registerId);
273  RAW_METHOD_DUMP(OS, registerType);
274  RAW_METHOD_DUMP(OS, relativeVirtualAddress);
275  RAW_METHOD_DUMP(OS, samplerSlot);
276  RAW_METHOD_DUMP(OS, signature);
277  RAW_METHOD_DUMP(OS, sizeInUdt);
278  RAW_METHOD_DUMP(OS, slot);
279  RAW_METHOD_DUMP(OS, sourceFileName);
280  RAW_METHOD_DUMP(OS, stride);
281  RAW_METHOD_DUMP(OS, subTypeId);
282  RAW_METHOD_DUMP(OS, symbolsFileName);
283  RAW_METHOD_DUMP(OS, targetOffset);
284  RAW_METHOD_DUMP(OS, targetRelativeVirtualAddress);
285  RAW_METHOD_DUMP(OS, targetVirtualAddress);
286  RAW_METHOD_DUMP(OS, targetSection);
287  RAW_METHOD_DUMP(OS, textureSlot);
288  RAW_METHOD_DUMP(OS, timeStamp);
289  RAW_METHOD_DUMP(OS, token);
290  RAW_ID_METHOD_DUMP(OS, typeId, Session, PdbSymbolIdField::Type, ShowIdFields,
291  RecurseIdFields);
292  RAW_METHOD_DUMP(OS, uavSlot);
293  RAW_METHOD_DUMP(OS, undecoratedName);
294  RAW_ID_METHOD_DUMP(OS, unmodifiedTypeId, Session,
295  PdbSymbolIdField::UnmodifiedType, ShowIdFields,
296  RecurseIdFields);
297  RAW_METHOD_DUMP(OS, upperBoundId);
298  RAW_METHOD_DUMP(OS, virtualBaseDispIndex);
299  RAW_METHOD_DUMP(OS, virtualBaseOffset);
300  RAW_METHOD_DUMP(OS, virtualTableShapeId);
301  RAW_METHOD_DUMP_AS(OS, dataKind, PDB_DataKind);
302  RAW_METHOD_DUMP(OS, guid);
303  RAW_METHOD_DUMP(OS, offset);
304  RAW_METHOD_DUMP(OS, thisAdjust);
305  RAW_METHOD_DUMP(OS, virtualBasePointerOffset);
306  RAW_METHOD_DUMP_AS(OS, locationType, PDB_LocType);
307  RAW_METHOD_DUMP(OS, machineType);
308  RAW_METHOD_DUMP(OS, thunkOrdinal);
309  RAW_METHOD_DUMP(OS, length);
310  RAW_METHOD_DUMP(OS, liveRangeLength);
311  RAW_METHOD_DUMP(OS, virtualAddress);
312  RAW_METHOD_DUMP_AS(OS, udtKind, PDB_UdtType);
313  RAW_METHOD_DUMP(OS, constructor);
314  RAW_METHOD_DUMP(OS, customCallingConvention);
315  RAW_METHOD_DUMP(OS, farReturn);
316  RAW_METHOD_DUMP(OS, code);
317  RAW_METHOD_DUMP(OS, compilerGenerated);
318  RAW_METHOD_DUMP(OS, constType);
319  RAW_METHOD_DUMP(OS, editAndContinueEnabled);
320  RAW_METHOD_DUMP(OS, function);
321  RAW_METHOD_DUMP(OS, stride);
322  RAW_METHOD_DUMP(OS, noStackOrdering);
325  RAW_METHOD_DUMP(OS, isCTypes);
328  RAW_METHOD_DUMP(OS, hasEH);
329  RAW_METHOD_DUMP(OS, hasEHa);
331  RAW_METHOD_DUMP(OS, framePointerPresent);
332  RAW_METHOD_DUMP(OS, inlSpec);
333  RAW_METHOD_DUMP(OS, interruptReturn);
337  RAW_METHOD_DUMP(OS, noInline);
338  RAW_METHOD_DUMP(OS, noReturn);
339  RAW_METHOD_DUMP(OS, optimizedCodeDebugInfo);
340  RAW_METHOD_DUMP(OS, overloadedOperator);
341  RAW_METHOD_DUMP(OS, hasSEH);
344  RAW_METHOD_DUMP(OS, strictGSCheck);
349  RAW_METHOD_DUMP(OS, intro);
356  RAW_METHOD_DUMP(OS, indirectVirtualBaseClass);
358  RAW_METHOD_DUMP(OS, intrinsic);
359  RAW_METHOD_DUMP(OS, isLTCG);
363  RAW_METHOD_DUMP(OS, managed);
364  RAW_METHOD_DUMP(OS, msil);
367  RAW_METHOD_DUMP(OS, nested);
369  RAW_METHOD_DUMP(OS, packed);
373  RAW_METHOD_DUMP(OS, pure);
374  RAW_METHOD_DUMP(OS, RValueReference);
376  RAW_METHOD_DUMP(OS, reference);
377  RAW_METHOD_DUMP(OS, restrictedType);
380  RAW_METHOD_DUMP(OS, scoped);
381  RAW_METHOD_DUMP(OS, isSdl);
385  RAW_METHOD_DUMP(OS, isStripped);
386  RAW_METHOD_DUMP(OS, unalignedType);
387  RAW_METHOD_DUMP(OS, notReached);
389  RAW_METHOD_DUMP(OS, virtual);
390  RAW_METHOD_DUMP(OS, virtualBaseClass);
392  RAW_METHOD_DUMP(OS, volatileType);
394  RAW_METHOD_DUMP(OS, unused);
395  RAW_METHOD_DUMP(OS, value);
396 }
397 
398 std::unique_ptr<IPDBEnumSymbols>
400  enum SymTagEnum EnumVal = static_cast<enum SymTagEnum>(Type);
401 
402  CComPtr<IDiaEnumSymbols> DiaEnumerator;
403  if (S_OK !=
404  Symbol->findChildrenEx(EnumVal, nullptr, nsNone, &DiaEnumerator)) {
405  if (S_OK != Symbol->findChildren(EnumVal, nullptr, nsNone, &DiaEnumerator))
406  return nullptr;
407  }
408 
409  return llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
410 }
411 
412 std::unique_ptr<IPDBEnumSymbols>
414  PDB_NameSearchFlags Flags) const {
416  llvm::convertUTF8ToUTF16String(Name, Name16);
417 
418  enum SymTagEnum EnumVal = static_cast<enum SymTagEnum>(Type);
419  DWORD CompareFlags = static_cast<DWORD>(Flags);
420  wchar_t *Name16Str = reinterpret_cast<wchar_t *>(Name16.data());
421 
422  CComPtr<IDiaEnumSymbols> DiaEnumerator;
423  if (S_OK !=
424  Symbol->findChildrenEx(EnumVal, Name16Str, CompareFlags, &DiaEnumerator))
425  return nullptr;
426 
427  return llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
428 }
429 
430 std::unique_ptr<IPDBEnumSymbols>
433  uint32_t Offset) const {
435  llvm::convertUTF8ToUTF16String(Name, Name16);
436 
437  enum SymTagEnum EnumVal = static_cast<enum SymTagEnum>(Type);
438 
439  DWORD CompareFlags = static_cast<DWORD>(Flags);
440  wchar_t *Name16Str = reinterpret_cast<wchar_t *>(Name16.data());
441 
442  CComPtr<IDiaEnumSymbols> DiaEnumerator;
443  if (S_OK != Symbol->findChildrenExByAddr(EnumVal, Name16Str, CompareFlags,
444  Section, Offset, &DiaEnumerator))
445  return nullptr;
446 
447  return llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
448 }
449 
450 std::unique_ptr<IPDBEnumSymbols>
452  PDB_NameSearchFlags Flags, uint64_t VA) const {
454  llvm::convertUTF8ToUTF16String(Name, Name16);
455 
456  enum SymTagEnum EnumVal = static_cast<enum SymTagEnum>(Type);
457 
458  DWORD CompareFlags = static_cast<DWORD>(Flags);
459  wchar_t *Name16Str = reinterpret_cast<wchar_t *>(Name16.data());
460 
461  CComPtr<IDiaEnumSymbols> DiaEnumerator;
462  if (S_OK != Symbol->findChildrenExByVA(EnumVal, Name16Str, CompareFlags, VA,
463  &DiaEnumerator))
464  return nullptr;
465 
466  return llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
467 }
468 
469 std::unique_ptr<IPDBEnumSymbols>
471  PDB_NameSearchFlags Flags, uint32_t RVA) const {
473  llvm::convertUTF8ToUTF16String(Name, Name16);
474 
475  enum SymTagEnum EnumVal = static_cast<enum SymTagEnum>(Type);
476  DWORD CompareFlags = static_cast<DWORD>(Flags);
477  wchar_t *Name16Str = reinterpret_cast<wchar_t *>(Name16.data());
478 
479  CComPtr<IDiaEnumSymbols> DiaEnumerator;
480  if (S_OK != Symbol->findChildrenExByRVA(EnumVal, Name16Str, CompareFlags, RVA,
481  &DiaEnumerator))
482  return nullptr;
483 
484  return llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
485 }
486 
487 std::unique_ptr<IPDBEnumSymbols>
489  CComPtr<IDiaEnumSymbols> DiaEnumerator;
490  if (S_OK != Symbol->findInlineFramesByAddr(Section, Offset, &DiaEnumerator))
491  return nullptr;
492 
493  return llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
494 }
495 
496 std::unique_ptr<IPDBEnumSymbols>
498  CComPtr<IDiaEnumSymbols> DiaEnumerator;
499  if (S_OK != Symbol->findInlineFramesByRVA(RVA, &DiaEnumerator))
500  return nullptr;
501 
502  return llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
503 }
504 
505 std::unique_ptr<IPDBEnumSymbols>
507  CComPtr<IDiaEnumSymbols> DiaEnumerator;
508  if (S_OK != Symbol->findInlineFramesByVA(VA, &DiaEnumerator))
509  return nullptr;
510 
511  return llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
512 }
513 
514 std::unique_ptr<IPDBEnumLineNumbers> DIARawSymbol::findInlineeLines() const {
515  CComPtr<IDiaEnumLineNumbers> DiaEnumerator;
516  if (S_OK != Symbol->findInlineeLines(&DiaEnumerator))
517  return nullptr;
518 
519  return llvm::make_unique<DIAEnumLineNumbers>(DiaEnumerator);
520 }
521 
522 std::unique_ptr<IPDBEnumLineNumbers>
524  uint32_t Length) const {
525  CComPtr<IDiaEnumLineNumbers> DiaEnumerator;
526  if (S_OK !=
527  Symbol->findInlineeLinesByAddr(Section, Offset, Length, &DiaEnumerator))
528  return nullptr;
529 
530  return llvm::make_unique<DIAEnumLineNumbers>(DiaEnumerator);
531 }
532 
533 std::unique_ptr<IPDBEnumLineNumbers>
535  CComPtr<IDiaEnumLineNumbers> DiaEnumerator;
536  if (S_OK != Symbol->findInlineeLinesByRVA(RVA, Length, &DiaEnumerator))
537  return nullptr;
538 
539  return llvm::make_unique<DIAEnumLineNumbers>(DiaEnumerator);
540 }
541 
542 std::unique_ptr<IPDBEnumLineNumbers>
543 DIARawSymbol::findInlineeLinesByVA(uint64_t VA, uint32_t Length) const {
544  CComPtr<IDiaEnumLineNumbers> DiaEnumerator;
545  if (S_OK != Symbol->findInlineeLinesByVA(VA, Length, &DiaEnumerator))
546  return nullptr;
547 
548  return llvm::make_unique<DIAEnumLineNumbers>(DiaEnumerator);
549 }
550 
552  bytes.clear();
553 
554  DWORD DataSize = 0;
555  Symbol->get_dataBytes(0, &DataSize, nullptr);
556  if (DataSize == 0)
557  return;
558 
559  bytes.resize(DataSize);
560  Symbol->get_dataBytes(DataSize, &DataSize, bytes.data());
561 }
562 
564  CComBSTR Result16;
565  if (S_OK != Symbol->get_undecoratedNameEx((DWORD)Flags, &Result16))
566  return std::string();
567 
568  const char *SrcBytes = reinterpret_cast<const char *>(Result16.m_str);
569  llvm::ArrayRef<char> SrcByteArray(SrcBytes, Result16.ByteLength());
570  std::string Result8;
571  if (!llvm::convertUTF16ToUTF8String(SrcByteArray, Result8))
572  return std::string();
573  return Result8;
574 }
575 
577  return PrivateGetDIAValue<DWORD, PDB_MemberAccess>(Symbol,
578  &IDiaSymbol::get_access);
579 }
580 
582  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_addressOffset);
583 }
584 
586  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_addressSection);
587 }
588 
590  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_age);
591 }
592 
594  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_arrayIndexTypeId);
595 }
596 
598  Version.Major = PrivateGetDIAValue(Symbol, &IDiaSymbol::get_backEndMajor);
599  Version.Minor = PrivateGetDIAValue(Symbol, &IDiaSymbol::get_backEndMinor);
600  Version.Build = PrivateGetDIAValue(Symbol, &IDiaSymbol::get_backEndBuild);
601  Version.QFE = PrivateGetDIAValue(Symbol, &IDiaSymbol::get_backEndQFE);
602 }
603 
605  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_baseDataOffset);
606 }
607 
609  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_baseDataSlot);
610 }
611 
613  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_baseSymbolId);
614 }
615 
617  return PrivateGetDIAValue<DWORD, PDB_BuiltinType>(Symbol,
618  &IDiaSymbol::get_baseType);
619 }
620 
622  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_bitPosition);
623 }
624 
626  return PrivateGetDIAValue<DWORD, PDB_CallingConv>(
627  Symbol, &IDiaSymbol::get_callingConvention);
628 }
629 
631  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_classParentId);
632 }
633 
634 std::string DIARawSymbol::getCompilerName() const {
635  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_compilerName);
636 }
637 
639  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_count);
640 }
641 
643  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_countLiveRanges);
644 }
645 
647  Version.Major = PrivateGetDIAValue(Symbol, &IDiaSymbol::get_frontEndMajor);
648  Version.Minor = PrivateGetDIAValue(Symbol, &IDiaSymbol::get_frontEndMinor);
649  Version.Build = PrivateGetDIAValue(Symbol, &IDiaSymbol::get_frontEndBuild);
650  Version.QFE = PrivateGetDIAValue(Symbol, &IDiaSymbol::get_frontEndQFE);
651 }
652 
654  return PrivateGetDIAValue<DWORD, PDB_Lang>(Symbol, &IDiaSymbol::get_language);
655 }
656 
658  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_lexicalParentId);
659 }
660 
661 std::string DIARawSymbol::getLibraryName() const {
662  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_libraryName);
663 }
664 
666  return PrivateGetDIAValue(Symbol,
667  &IDiaSymbol::get_liveRangeStartAddressOffset);
668 }
669 
671  return PrivateGetDIAValue(Symbol,
672  &IDiaSymbol::get_liveRangeStartAddressSection);
673 }
674 
676  return PrivateGetDIAValue(
677  Symbol, &IDiaSymbol::get_liveRangeStartRelativeVirtualAddress);
678 }
679 
681  return PrivateGetDIAValue<DWORD, codeview::RegisterId>(
682  Symbol, &IDiaSymbol::get_localBasePointerRegisterId);
683 }
684 
686  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_lowerBoundId);
687 }
688 
690  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_memorySpaceKind);
691 }
692 
693 std::string DIARawSymbol::getName() const {
694  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_name);
695 }
696 
698  return PrivateGetDIAValue(Symbol,
699  &IDiaSymbol::get_numberOfAcceleratorPointerTags);
700 }
701 
703  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_numberOfColumns);
704 }
705 
707  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_numberOfModifiers);
708 }
709 
711  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_numberOfRegisterIndices);
712 }
713 
715  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_numberOfRows);
716 }
717 
718 std::string DIARawSymbol::getObjectFileName() const {
719  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_objectFileName);
720 }
721 
723  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_oemId);
724 }
725 
727  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_oemSymbolId);
728 }
729 
731  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_offsetInUdt);
732 }
733 
735  return PrivateGetDIAValue<DWORD, PDB_Cpu>(Symbol, &IDiaSymbol::get_platform);
736 }
737 
739  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_rank);
740 }
741 
743  return PrivateGetDIAValue<DWORD, codeview::RegisterId>(
744  Symbol, &IDiaSymbol::get_registerId);
745 }
746 
748  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_registerType);
749 }
750 
752  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_relativeVirtualAddress);
753 }
754 
756  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_samplerSlot);
757 }
758 
760  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_signature);
761 }
762 
764  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_sizeInUdt);
765 }
766 
768  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_slot);
769 }
770 
771 std::string DIARawSymbol::getSourceFileName() const {
772  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_sourceFileName);
773 }
774 
775 std::unique_ptr<IPDBLineNumber> DIARawSymbol::getSrcLineOnTypeDefn() const {
776  CComPtr<IDiaLineNumber> LineNumber;
777  if (FAILED(Symbol->getSrcLineOnTypeDefn(&LineNumber)) || !LineNumber)
778  return nullptr;
779 
780  return llvm::make_unique<DIALineNumber>(LineNumber);
781 }
782 
784  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_stride);
785 }
786 
788  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_subTypeId);
789 }
790 
791 std::string DIARawSymbol::getSymbolsFileName() const {
792  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_symbolsFileName);
793 }
794 
796  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_symIndexId);
797 }
798 
800  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_targetOffset);
801 }
802 
804  return PrivateGetDIAValue(Symbol,
805  &IDiaSymbol::get_targetRelativeVirtualAddress);
806 }
807 
809  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_targetVirtualAddress);
810 }
811 
813  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_targetSection);
814 }
815 
817  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_textureSlot);
818 }
819 
821  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_timeStamp);
822 }
823 
825  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_token);
826 }
827 
829  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_typeId);
830 }
831 
833  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_uavSlot);
834 }
835 
836 std::string DIARawSymbol::getUndecoratedName() const {
837  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_undecoratedName);
838 }
839 
841  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_unmodifiedTypeId);
842 }
843 
845  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_upperBoundId);
846 }
847 
849  VARIANT Value;
850  Value.vt = VT_EMPTY;
851  if (S_OK != Symbol->get_value(&Value))
852  return Variant();
853 
854  return VariantFromVARIANT(Value);
855 }
856 
858  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtualBaseDispIndex);
859 }
860 
862  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtualBaseOffset);
863 }
864 
866  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtualTableShapeId);
867 }
868 
869 std::unique_ptr<PDBSymbolTypeBuiltin>
871  CComPtr<IDiaSymbol> TableType;
872  if (FAILED(Symbol->get_virtualBaseTableType(&TableType)) || !TableType)
873  return nullptr;
874 
875  auto RawVT = llvm::make_unique<DIARawSymbol>(Session, TableType);
876  auto Pointer =
877  PDBSymbol::createAs<PDBSymbolTypePointer>(Session, std::move(RawVT));
878  return unique_dyn_cast<PDBSymbolTypeBuiltin>(Pointer->getPointeeType());
879 }
880 
882  return PrivateGetDIAValue<DWORD, PDB_DataKind>(Symbol,
883  &IDiaSymbol::get_dataKind);
884 }
885 
887  return PrivateGetDIAValue<DWORD, PDB_SymType>(Symbol,
888  &IDiaSymbol::get_symTag);
889 }
890 
892  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_guid);
893 }
894 
895 int32_t DIARawSymbol::getOffset() const {
896  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_offset);
897 }
898 
900  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_thisAdjust);
901 }
902 
904  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtualBasePointerOffset);
905 }
906 
908  return PrivateGetDIAValue<DWORD, PDB_LocType>(Symbol,
909  &IDiaSymbol::get_locationType);
910 }
911 
913  return PrivateGetDIAValue<DWORD, PDB_Machine>(Symbol,
914  &IDiaSymbol::get_machineType);
915 }
916 
918  return PrivateGetDIAValue<DWORD, codeview::ThunkOrdinal>(
919  Symbol, &IDiaSymbol::get_thunkOrdinal);
920 }
921 
922 uint64_t DIARawSymbol::getLength() const {
923  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_length);
924 }
925 
927  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_liveRangeLength);
928 }
929 
931  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtualAddress);
932 }
933 
935  return PrivateGetDIAValue<DWORD, PDB_UdtType>(Symbol,
936  &IDiaSymbol::get_udtKind);
937 }
938 
940  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_constructor);
941 }
942 
944  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_customCallingConvention);
945 }
946 
948  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_farReturn);
949 }
950 
951 bool DIARawSymbol::isCode() const {
952  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_code);
953 }
954 
956  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_compilerGenerated);
957 }
958 
960  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_constType);
961 }
962 
964  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_editAndContinueEnabled);
965 }
966 
968  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_function);
969 }
970 
972  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_addressTaken);
973 }
974 
976  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_noStackOrdering);
977 }
978 
980  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasAlloca);
981 }
982 
984  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasAssignmentOperator);
985 }
986 
988  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isCTypes);
989 }
990 
992  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasCastOperator);
993 }
994 
996  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasDebugInfo);
997 }
998 
999 bool DIARawSymbol::hasEH() const {
1000  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasEH);
1001 }
1002 
1003 bool DIARawSymbol::hasEHa() const {
1004  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasEHa);
1005 }
1006 
1008  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasInlAsm);
1009 }
1010 
1012  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_inlSpec);
1013 }
1014 
1016  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_interruptReturn);
1017 }
1018 
1020  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_framePointerPresent);
1021 }
1022 
1024  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasLongJump);
1025 }
1026 
1028  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasManagedCode);
1029 }
1030 
1032  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasNestedTypes);
1033 }
1034 
1036  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_noInline);
1037 }
1038 
1040  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_noReturn);
1041 }
1042 
1044  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_optimizedCodeDebugInfo);
1045 }
1046 
1048  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_overloadedOperator);
1049 }
1050 
1051 bool DIARawSymbol::hasSEH() const {
1052  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasSEH);
1053 }
1054 
1056  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasSecurityChecks);
1057 }
1058 
1060  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasSetJump);
1061 }
1062 
1064  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_strictGSCheck);
1065 }
1066 
1068  return PrivateGetDIAValue(Symbol,
1069  &IDiaSymbol::get_isAcceleratorGroupSharedLocal);
1070 }
1071 
1073  return PrivateGetDIAValue(Symbol,
1074  &IDiaSymbol::get_isAcceleratorPointerTagLiveRange);
1075 }
1076 
1078  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isAcceleratorStubFunction);
1079 }
1080 
1082  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isAggregated);
1083 }
1084 
1086  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_intro);
1087 }
1088 
1090  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isCVTCIL);
1091 }
1092 
1094  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isConstructorVirtualBase);
1095 }
1096 
1098  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isCxxReturnUdt);
1099 }
1100 
1102  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isDataAligned);
1103 }
1104 
1106  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isHLSLData);
1107 }
1108 
1110  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isHotpatchable);
1111 }
1112 
1114  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_indirectVirtualBaseClass);
1115 }
1116 
1118  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isInterfaceUdt);
1119 }
1120 
1122  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_intrinsic);
1123 }
1124 
1125 bool DIARawSymbol::isLTCG() const {
1126  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isLTCG);
1127 }
1128 
1130  return PrivateGetDIAValue(Symbol,
1131  &IDiaSymbol::get_isLocationControlFlowDependent);
1132 }
1133 
1135  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isMSILNetmodule);
1136 }
1137 
1139  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isMatrixRowMajor);
1140 }
1141 
1143  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_managed);
1144 }
1145 
1147  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_msil);
1148 }
1149 
1151  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isMultipleInheritance);
1152 }
1153 
1155  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isNaked);
1156 }
1157 
1159  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_nested);
1160 }
1161 
1163  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isOptimizedAway);
1164 }
1165 
1167  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_packed);
1168 }
1169 
1171  return PrivateGetDIAValue(Symbol,
1172  &IDiaSymbol::get_isPointerBasedOnSymbolValue);
1173 }
1174 
1176  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isPointerToDataMember);
1177 }
1178 
1180  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isPointerToMemberFunction);
1181 }
1182 
1184  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_pure);
1185 }
1186 
1188  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_RValueReference);
1189 }
1190 
1192  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isRefUdt);
1193 }
1194 
1196  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_reference);
1197 }
1198 
1200  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_restrictedType);
1201 }
1202 
1204  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isReturnValue);
1205 }
1206 
1208  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isSafeBuffers);
1209 }
1210 
1212  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_scoped);
1213 }
1214 
1215 bool DIARawSymbol::isSdl() const {
1216  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isSdl);
1217 }
1218 
1220  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isSingleInheritance);
1221 }
1222 
1224  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isSplitted);
1225 }
1226 
1228  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isStatic);
1229 }
1230 
1232  // hasPrivateSymbols is the opposite of isStripped, but we expose
1233  // hasPrivateSymbols as a more intuitive interface.
1234  return !PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isStripped);
1235 }
1236 
1238  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_unalignedType);
1239 }
1240 
1242  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_notReached);
1243 }
1244 
1246  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isValueUdt);
1247 }
1248 
1250  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtual);
1251 }
1252 
1254  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtualBaseClass);
1255 }
1256 
1258  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isVirtualInheritance);
1259 }
1260 
1262  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_volatileType);
1263 }
1264 
1266  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_wasInlined);
1267 }
1268 
1269 std::string DIARawSymbol::getUnused() const {
1270  return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_unused);
1271 }
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
This class represents lattice values for constants.
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:250
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:101
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
amdgpu Simplify well known AMD library false Value Value const Twine & Name
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: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
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:301
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:1252
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:183
uint32_t getRank() const override
PDB_MemberAccess getAccess() const override
uint32_t UInt32
Definition: PDBTypes.h:403
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: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:168
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:232
uint32_t getTargetRelativeVirtualAddress() const override
uint64_t UInt64
Definition: PDBTypes.h:404
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::string invokeBstrMethod(Obj &Object, HRESULT(__stdcall Obj::*Func)(BSTR *))
Definition: DIAUtils.h:17
union llvm::pdb::Variant::@215 Value
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:402
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:275
Definition: JSON.cpp:598
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:392
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:1011
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:324
void resize(size_type N)
Definition: SmallVector.h:351