1*06f32e7eSjoerg //===- DIARawSymbol.cpp - DIA implementation of IPDBRawSymbol ---*- C++ -*-===//
2*06f32e7eSjoerg //
3*06f32e7eSjoerg // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*06f32e7eSjoerg // See https://llvm.org/LICENSE.txt for license information.
5*06f32e7eSjoerg // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*06f32e7eSjoerg //
7*06f32e7eSjoerg //===----------------------------------------------------------------------===//
8*06f32e7eSjoerg 
9*06f32e7eSjoerg #include "llvm/DebugInfo/PDB/DIA/DIARawSymbol.h"
10*06f32e7eSjoerg #include "llvm/ADT/ArrayRef.h"
11*06f32e7eSjoerg #include "llvm/ADT/STLExtras.h"
12*06f32e7eSjoerg #include "llvm/DebugInfo/CodeView/Formatters.h"
13*06f32e7eSjoerg #include "llvm/DebugInfo/PDB/DIA/DIAEnumLineNumbers.h"
14*06f32e7eSjoerg #include "llvm/DebugInfo/PDB/DIA/DIAEnumSymbols.h"
15*06f32e7eSjoerg #include "llvm/DebugInfo/PDB/DIA/DIALineNumber.h"
16*06f32e7eSjoerg #include "llvm/DebugInfo/PDB/DIA/DIASession.h"
17*06f32e7eSjoerg #include "llvm/DebugInfo/PDB/DIA/DIAUtils.h"
18*06f32e7eSjoerg #include "llvm/DebugInfo/PDB/PDBExtras.h"
19*06f32e7eSjoerg #include "llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h"
20*06f32e7eSjoerg #include "llvm/DebugInfo/PDB/PDBSymbolTypePointer.h"
21*06f32e7eSjoerg #include "llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h"
22*06f32e7eSjoerg #include "llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h"
23*06f32e7eSjoerg #include "llvm/Support/ConvertUTF.h"
24*06f32e7eSjoerg #include "llvm/Support/raw_ostream.h"
25*06f32e7eSjoerg 
26*06f32e7eSjoerg using namespace llvm;
27*06f32e7eSjoerg using namespace llvm::pdb;
28*06f32e7eSjoerg 
29*06f32e7eSjoerg namespace {
VariantFromVARIANT(const VARIANT & V)30*06f32e7eSjoerg Variant VariantFromVARIANT(const VARIANT &V) {
31*06f32e7eSjoerg   Variant Result;
32*06f32e7eSjoerg   switch (V.vt) {
33*06f32e7eSjoerg   case VT_I1:
34*06f32e7eSjoerg     Result.Value.Int8 = V.cVal;
35*06f32e7eSjoerg     Result.Type = PDB_VariantType::Int8;
36*06f32e7eSjoerg     break;
37*06f32e7eSjoerg   case VT_I2:
38*06f32e7eSjoerg     Result.Value.Int16 = V.iVal;
39*06f32e7eSjoerg     Result.Type = PDB_VariantType::Int16;
40*06f32e7eSjoerg     break;
41*06f32e7eSjoerg   case VT_I4:
42*06f32e7eSjoerg     Result.Value.Int32 = V.intVal;
43*06f32e7eSjoerg     Result.Type = PDB_VariantType::Int32;
44*06f32e7eSjoerg     break;
45*06f32e7eSjoerg   case VT_I8:
46*06f32e7eSjoerg     Result.Value.Int64 = V.llVal;
47*06f32e7eSjoerg     Result.Type = PDB_VariantType::Int64;
48*06f32e7eSjoerg     break;
49*06f32e7eSjoerg   case VT_UI1:
50*06f32e7eSjoerg     Result.Value.UInt8 = V.bVal;
51*06f32e7eSjoerg     Result.Type = PDB_VariantType::UInt8;
52*06f32e7eSjoerg     break;
53*06f32e7eSjoerg   case VT_UI2:
54*06f32e7eSjoerg     Result.Value.UInt16 = V.uiVal;
55*06f32e7eSjoerg     Result.Type = PDB_VariantType::UInt16;
56*06f32e7eSjoerg     break;
57*06f32e7eSjoerg   case VT_UI4:
58*06f32e7eSjoerg     Result.Value.UInt32 = V.uintVal;
59*06f32e7eSjoerg     Result.Type = PDB_VariantType::UInt32;
60*06f32e7eSjoerg     break;
61*06f32e7eSjoerg   case VT_UI8:
62*06f32e7eSjoerg     Result.Value.UInt64 = V.ullVal;
63*06f32e7eSjoerg     Result.Type = PDB_VariantType::UInt64;
64*06f32e7eSjoerg     break;
65*06f32e7eSjoerg   case VT_BOOL:
66*06f32e7eSjoerg     Result.Value.Bool = (V.boolVal == VARIANT_TRUE) ? true : false;
67*06f32e7eSjoerg     Result.Type = PDB_VariantType::Bool;
68*06f32e7eSjoerg     break;
69*06f32e7eSjoerg   case VT_R4:
70*06f32e7eSjoerg     Result.Value.Single = V.fltVal;
71*06f32e7eSjoerg     Result.Type = PDB_VariantType::Single;
72*06f32e7eSjoerg     break;
73*06f32e7eSjoerg   case VT_R8:
74*06f32e7eSjoerg     Result.Value.Double = V.dblVal;
75*06f32e7eSjoerg     Result.Type = PDB_VariantType::Double;
76*06f32e7eSjoerg     break;
77*06f32e7eSjoerg   case VT_BSTR: {
78*06f32e7eSjoerg     const char *SrcBytes = reinterpret_cast<const char *>(V.bstrVal);
79*06f32e7eSjoerg     llvm::ArrayRef<char> SrcByteArray(SrcBytes, SysStringByteLen(V.bstrVal));
80*06f32e7eSjoerg     std::string Result8;
81*06f32e7eSjoerg     if (!llvm::convertUTF16ToUTF8String(SrcByteArray, Result8))
82*06f32e7eSjoerg       Result.Value.String = nullptr;
83*06f32e7eSjoerg     Result.Value.String = new char[Result8.length() + 1];
84*06f32e7eSjoerg     ::strcpy(Result.Value.String, Result8.c_str());
85*06f32e7eSjoerg     Result.Type = PDB_VariantType::String;
86*06f32e7eSjoerg     break;
87*06f32e7eSjoerg   }
88*06f32e7eSjoerg   default:
89*06f32e7eSjoerg     Result.Type = PDB_VariantType::Unknown;
90*06f32e7eSjoerg     break;
91*06f32e7eSjoerg   }
92*06f32e7eSjoerg   return Result;
93*06f32e7eSjoerg }
94*06f32e7eSjoerg 
95*06f32e7eSjoerg template <typename ArgType>
PrivateGetDIAValue(IDiaSymbol * Symbol,HRESULT (__stdcall IDiaSymbol::* Method)(ArgType *))96*06f32e7eSjoerg ArgType PrivateGetDIAValue(IDiaSymbol *Symbol,
97*06f32e7eSjoerg                            HRESULT (__stdcall IDiaSymbol::*Method)(ArgType *)) {
98*06f32e7eSjoerg   ArgType Value;
99*06f32e7eSjoerg   if (S_OK == (Symbol->*Method)(&Value))
100*06f32e7eSjoerg     return static_cast<ArgType>(Value);
101*06f32e7eSjoerg 
102*06f32e7eSjoerg   return ArgType();
103*06f32e7eSjoerg }
104*06f32e7eSjoerg 
105*06f32e7eSjoerg template <typename ArgType, typename RetType>
PrivateGetDIAValue(IDiaSymbol * Symbol,HRESULT (__stdcall IDiaSymbol::* Method)(ArgType *))106*06f32e7eSjoerg RetType PrivateGetDIAValue(IDiaSymbol *Symbol,
107*06f32e7eSjoerg                            HRESULT (__stdcall IDiaSymbol::*Method)(ArgType *)) {
108*06f32e7eSjoerg   ArgType Value;
109*06f32e7eSjoerg   if (S_OK == (Symbol->*Method)(&Value))
110*06f32e7eSjoerg     return static_cast<RetType>(Value);
111*06f32e7eSjoerg 
112*06f32e7eSjoerg   return RetType();
113*06f32e7eSjoerg }
114*06f32e7eSjoerg 
115*06f32e7eSjoerg std::string
PrivateGetDIAValue(IDiaSymbol * Symbol,HRESULT (__stdcall IDiaSymbol::* Method)(BSTR *))116*06f32e7eSjoerg PrivateGetDIAValue(IDiaSymbol *Symbol,
117*06f32e7eSjoerg                    HRESULT (__stdcall IDiaSymbol::*Method)(BSTR *)) {
118*06f32e7eSjoerg   return invokeBstrMethod(*Symbol, Method);
119*06f32e7eSjoerg }
120*06f32e7eSjoerg 
121*06f32e7eSjoerg codeview::GUID
PrivateGetDIAValue(IDiaSymbol * Symbol,HRESULT (__stdcall IDiaSymbol::* Method)(GUID *))122*06f32e7eSjoerg PrivateGetDIAValue(IDiaSymbol *Symbol,
123*06f32e7eSjoerg                    HRESULT (__stdcall IDiaSymbol::*Method)(GUID *)) {
124*06f32e7eSjoerg   GUID Result;
125*06f32e7eSjoerg   if (S_OK != (Symbol->*Method)(&Result))
126*06f32e7eSjoerg     return codeview::GUID();
127*06f32e7eSjoerg 
128*06f32e7eSjoerg   static_assert(sizeof(codeview::GUID) == sizeof(GUID),
129*06f32e7eSjoerg                 "GUID is the wrong size!");
130*06f32e7eSjoerg   codeview::GUID IdResult;
131*06f32e7eSjoerg   ::memcpy(&IdResult, &Result, sizeof(GUID));
132*06f32e7eSjoerg   return IdResult;
133*06f32e7eSjoerg }
134*06f32e7eSjoerg 
135*06f32e7eSjoerg template <typename PrintType, typename ArgType>
DumpDIAValueAs(llvm::raw_ostream & OS,int Indent,StringRef Name,IDiaSymbol * Symbol,HRESULT (__stdcall IDiaSymbol::* Method)(ArgType *))136*06f32e7eSjoerg void DumpDIAValueAs(llvm::raw_ostream &OS, int Indent, StringRef Name,
137*06f32e7eSjoerg                     IDiaSymbol *Symbol,
138*06f32e7eSjoerg                     HRESULT (__stdcall IDiaSymbol::*Method)(ArgType *)) {
139*06f32e7eSjoerg   ArgType Value;
140*06f32e7eSjoerg   if (S_OK == (Symbol->*Method)(&Value))
141*06f32e7eSjoerg     dumpSymbolField(OS, Name, static_cast<PrintType>(Value), Indent);
142*06f32e7eSjoerg }
143*06f32e7eSjoerg 
DumpDIAIdValue(llvm::raw_ostream & OS,int Indent,StringRef Name,IDiaSymbol * Symbol,HRESULT (__stdcall IDiaSymbol::* Method)(DWORD *),const IPDBSession & Session,PdbSymbolIdField FieldId,PdbSymbolIdField ShowFlags,PdbSymbolIdField RecurseFlags)144*06f32e7eSjoerg void DumpDIAIdValue(llvm::raw_ostream &OS, int Indent, StringRef Name,
145*06f32e7eSjoerg                     IDiaSymbol *Symbol,
146*06f32e7eSjoerg                     HRESULT (__stdcall IDiaSymbol::*Method)(DWORD *),
147*06f32e7eSjoerg                     const IPDBSession &Session, PdbSymbolIdField FieldId,
148*06f32e7eSjoerg                     PdbSymbolIdField ShowFlags, PdbSymbolIdField RecurseFlags) {
149*06f32e7eSjoerg   DWORD Value;
150*06f32e7eSjoerg   if (S_OK == (Symbol->*Method)(&Value))
151*06f32e7eSjoerg     dumpSymbolIdField(OS, Name, Value, Indent, Session, FieldId, ShowFlags,
152*06f32e7eSjoerg                       RecurseFlags);
153*06f32e7eSjoerg }
154*06f32e7eSjoerg 
155*06f32e7eSjoerg template <typename ArgType>
DumpDIAValue(llvm::raw_ostream & OS,int Indent,StringRef Name,IDiaSymbol * Symbol,HRESULT (__stdcall IDiaSymbol::* Method)(ArgType *))156*06f32e7eSjoerg void DumpDIAValue(llvm::raw_ostream &OS, int Indent, StringRef Name,
157*06f32e7eSjoerg                   IDiaSymbol *Symbol,
158*06f32e7eSjoerg                   HRESULT (__stdcall IDiaSymbol::*Method)(ArgType *)) {
159*06f32e7eSjoerg   ArgType Value;
160*06f32e7eSjoerg   if (S_OK == (Symbol->*Method)(&Value))
161*06f32e7eSjoerg     dumpSymbolField(OS, Name, Value, Indent);
162*06f32e7eSjoerg }
163*06f32e7eSjoerg 
DumpDIAValue(llvm::raw_ostream & OS,int Indent,StringRef Name,IDiaSymbol * Symbol,HRESULT (__stdcall IDiaSymbol::* Method)(BSTR *))164*06f32e7eSjoerg void DumpDIAValue(llvm::raw_ostream &OS, int Indent, StringRef Name,
165*06f32e7eSjoerg                   IDiaSymbol *Symbol,
166*06f32e7eSjoerg                   HRESULT (__stdcall IDiaSymbol::*Method)(BSTR *)) {
167*06f32e7eSjoerg   BSTR Value = nullptr;
168*06f32e7eSjoerg   if (S_OK != (Symbol->*Method)(&Value))
169*06f32e7eSjoerg     return;
170*06f32e7eSjoerg   const char *Bytes = reinterpret_cast<const char *>(Value);
171*06f32e7eSjoerg   ArrayRef<char> ByteArray(Bytes, ::SysStringByteLen(Value));
172*06f32e7eSjoerg   std::string Result;
173*06f32e7eSjoerg   if (llvm::convertUTF16ToUTF8String(ByteArray, Result))
174*06f32e7eSjoerg     dumpSymbolField(OS, Name, Result, Indent);
175*06f32e7eSjoerg   ::SysFreeString(Value);
176*06f32e7eSjoerg }
177*06f32e7eSjoerg 
DumpDIAValue(llvm::raw_ostream & OS,int Indent,StringRef Name,IDiaSymbol * Symbol,HRESULT (__stdcall IDiaSymbol::* Method)(VARIANT *))178*06f32e7eSjoerg void DumpDIAValue(llvm::raw_ostream &OS, int Indent, StringRef Name,
179*06f32e7eSjoerg                   IDiaSymbol *Symbol,
180*06f32e7eSjoerg                   HRESULT (__stdcall IDiaSymbol::*Method)(VARIANT *)) {
181*06f32e7eSjoerg   VARIANT Value;
182*06f32e7eSjoerg   Value.vt = VT_EMPTY;
183*06f32e7eSjoerg   if (S_OK != (Symbol->*Method)(&Value))
184*06f32e7eSjoerg     return;
185*06f32e7eSjoerg   Variant V = VariantFromVARIANT(Value);
186*06f32e7eSjoerg 
187*06f32e7eSjoerg   dumpSymbolField(OS, Name, V, Indent);
188*06f32e7eSjoerg }
189*06f32e7eSjoerg } // namespace
190*06f32e7eSjoerg 
191*06f32e7eSjoerg namespace llvm {
operator <<(llvm::raw_ostream & OS,const GUID & G)192*06f32e7eSjoerg llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const GUID &G) {
193*06f32e7eSjoerg   StringRef GuidBytes(reinterpret_cast<const char *>(&G), sizeof(G));
194*06f32e7eSjoerg   codeview::detail::GuidAdapter A(GuidBytes);
195*06f32e7eSjoerg   A.format(OS, "");
196*06f32e7eSjoerg   return OS;
197*06f32e7eSjoerg }
198*06f32e7eSjoerg } // namespace llvm
199*06f32e7eSjoerg 
DIARawSymbol(const DIASession & PDBSession,CComPtr<IDiaSymbol> DiaSymbol)200*06f32e7eSjoerg DIARawSymbol::DIARawSymbol(const DIASession &PDBSession,
201*06f32e7eSjoerg                            CComPtr<IDiaSymbol> DiaSymbol)
202*06f32e7eSjoerg     : Session(PDBSession), Symbol(DiaSymbol) {}
203*06f32e7eSjoerg 
204*06f32e7eSjoerg #define RAW_ID_METHOD_DUMP(Stream, Method, Session, FieldId, ShowFlags,        \
205*06f32e7eSjoerg                            RecurseFlags)                                       \
206*06f32e7eSjoerg   DumpDIAIdValue(Stream, Indent, StringRef{#Method}, Symbol,                   \
207*06f32e7eSjoerg                  &IDiaSymbol::get_##Method, Session, FieldId, ShowFlags,       \
208*06f32e7eSjoerg                  RecurseFlags);
209*06f32e7eSjoerg 
210*06f32e7eSjoerg #define RAW_METHOD_DUMP(Stream, Method)                                        \
211*06f32e7eSjoerg   DumpDIAValue(Stream, Indent, StringRef{#Method}, Symbol,                     \
212*06f32e7eSjoerg                &IDiaSymbol::get_##Method);
213*06f32e7eSjoerg 
214*06f32e7eSjoerg #define RAW_METHOD_DUMP_AS(Stream, Method, Type)                               \
215*06f32e7eSjoerg   DumpDIAValueAs<Type>(Stream, Indent, StringRef{#Method}, Symbol,             \
216*06f32e7eSjoerg                        &IDiaSymbol::get_##Method);
217*06f32e7eSjoerg 
dump(raw_ostream & OS,int Indent,PdbSymbolIdField ShowIdFields,PdbSymbolIdField RecurseIdFields) const218*06f32e7eSjoerg void DIARawSymbol::dump(raw_ostream &OS, int Indent,
219*06f32e7eSjoerg                         PdbSymbolIdField ShowIdFields,
220*06f32e7eSjoerg                         PdbSymbolIdField RecurseIdFields) const {
221*06f32e7eSjoerg   RAW_ID_METHOD_DUMP(OS, symIndexId, Session, PdbSymbolIdField::SymIndexId,
222*06f32e7eSjoerg                      ShowIdFields, RecurseIdFields);
223*06f32e7eSjoerg   RAW_METHOD_DUMP_AS(OS, symTag, PDB_SymType);
224*06f32e7eSjoerg 
225*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, access);
226*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, addressOffset);
227*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, addressSection);
228*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, age);
229*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, arrayIndexTypeId);
230*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, backEndMajor);
231*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, backEndMinor);
232*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, backEndBuild);
233*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, backEndQFE);
234*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, baseDataOffset);
235*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, baseDataSlot);
236*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, baseSymbolId);
237*06f32e7eSjoerg   RAW_METHOD_DUMP_AS(OS, baseType, PDB_BuiltinType);
238*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, bitPosition);
239*06f32e7eSjoerg   RAW_METHOD_DUMP_AS(OS, callingConvention, PDB_CallingConv);
240*06f32e7eSjoerg   RAW_ID_METHOD_DUMP(OS, classParentId, Session, PdbSymbolIdField::ClassParent,
241*06f32e7eSjoerg                      ShowIdFields, RecurseIdFields);
242*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, compilerName);
243*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, count);
244*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, countLiveRanges);
245*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, frontEndMajor);
246*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, frontEndMinor);
247*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, frontEndBuild);
248*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, frontEndQFE);
249*06f32e7eSjoerg   RAW_ID_METHOD_DUMP(OS, lexicalParentId, Session,
250*06f32e7eSjoerg                      PdbSymbolIdField::LexicalParent, ShowIdFields,
251*06f32e7eSjoerg                      RecurseIdFields);
252*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, libraryName);
253*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, liveRangeStartAddressOffset);
254*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, liveRangeStartAddressSection);
255*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, liveRangeStartRelativeVirtualAddress);
256*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, localBasePointerRegisterId);
257*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, lowerBoundId);
258*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, memorySpaceKind);
259*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, name);
260*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, numberOfAcceleratorPointerTags);
261*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, numberOfColumns);
262*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, numberOfModifiers);
263*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, numberOfRegisterIndices);
264*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, numberOfRows);
265*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, objectFileName);
266*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, oemId);
267*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, oemSymbolId);
268*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, offsetInUdt);
269*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, platform);
270*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, rank);
271*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, registerId);
272*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, registerType);
273*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, relativeVirtualAddress);
274*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, samplerSlot);
275*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, signature);
276*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, sizeInUdt);
277*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, slot);
278*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, sourceFileName);
279*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, stride);
280*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, subTypeId);
281*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, symbolsFileName);
282*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, targetOffset);
283*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, targetRelativeVirtualAddress);
284*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, targetVirtualAddress);
285*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, targetSection);
286*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, textureSlot);
287*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, timeStamp);
288*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, token);
289*06f32e7eSjoerg   RAW_ID_METHOD_DUMP(OS, typeId, Session, PdbSymbolIdField::Type, ShowIdFields,
290*06f32e7eSjoerg                      RecurseIdFields);
291*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, uavSlot);
292*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, undecoratedName);
293*06f32e7eSjoerg   RAW_ID_METHOD_DUMP(OS, unmodifiedTypeId, Session,
294*06f32e7eSjoerg                      PdbSymbolIdField::UnmodifiedType, ShowIdFields,
295*06f32e7eSjoerg                      RecurseIdFields);
296*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, upperBoundId);
297*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, virtualBaseDispIndex);
298*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, virtualBaseOffset);
299*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, virtualTableShapeId);
300*06f32e7eSjoerg   RAW_METHOD_DUMP_AS(OS, dataKind, PDB_DataKind);
301*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, guid);
302*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, offset);
303*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, thisAdjust);
304*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, virtualBasePointerOffset);
305*06f32e7eSjoerg   RAW_METHOD_DUMP_AS(OS, locationType, PDB_LocType);
306*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, machineType);
307*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, thunkOrdinal);
308*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, length);
309*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, liveRangeLength);
310*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, virtualAddress);
311*06f32e7eSjoerg   RAW_METHOD_DUMP_AS(OS, udtKind, PDB_UdtType);
312*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, constructor);
313*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, customCallingConvention);
314*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, farReturn);
315*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, code);
316*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, compilerGenerated);
317*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, constType);
318*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, editAndContinueEnabled);
319*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, function);
320*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, stride);
321*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, noStackOrdering);
322*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, hasAlloca);
323*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, hasAssignmentOperator);
324*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, isCTypes);
325*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, hasCastOperator);
326*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, hasDebugInfo);
327*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, hasEH);
328*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, hasEHa);
329*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, hasInlAsm);
330*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, framePointerPresent);
331*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, inlSpec);
332*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, interruptReturn);
333*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, hasLongJump);
334*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, hasManagedCode);
335*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, hasNestedTypes);
336*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, noInline);
337*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, noReturn);
338*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, optimizedCodeDebugInfo);
339*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, overloadedOperator);
340*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, hasSEH);
341*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, hasSecurityChecks);
342*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, hasSetJump);
343*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, strictGSCheck);
344*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, isAcceleratorGroupSharedLocal);
345*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, isAcceleratorPointerTagLiveRange);
346*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, isAcceleratorStubFunction);
347*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, isAggregated);
348*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, intro);
349*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, isCVTCIL);
350*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, isConstructorVirtualBase);
351*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, isCxxReturnUdt);
352*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, isDataAligned);
353*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, isHLSLData);
354*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, isHotpatchable);
355*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, indirectVirtualBaseClass);
356*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, isInterfaceUdt);
357*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, intrinsic);
358*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, isLTCG);
359*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, isLocationControlFlowDependent);
360*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, isMSILNetmodule);
361*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, isMatrixRowMajor);
362*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, managed);
363*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, msil);
364*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, isMultipleInheritance);
365*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, isNaked);
366*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, nested);
367*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, isOptimizedAway);
368*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, packed);
369*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, isPointerBasedOnSymbolValue);
370*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, isPointerToDataMember);
371*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, isPointerToMemberFunction);
372*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, pure);
373*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, RValueReference);
374*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, isRefUdt);
375*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, reference);
376*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, restrictedType);
377*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, isReturnValue);
378*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, isSafeBuffers);
379*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, scoped);
380*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, isSdl);
381*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, isSingleInheritance);
382*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, isSplitted);
383*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, isStatic);
384*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, isStripped);
385*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, unalignedType);
386*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, notReached);
387*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, isValueUdt);
388*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, virtual);
389*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, virtualBaseClass);
390*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, isVirtualInheritance);
391*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, volatileType);
392*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, wasInlined);
393*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, unused);
394*06f32e7eSjoerg   RAW_METHOD_DUMP(OS, value);
395*06f32e7eSjoerg }
396*06f32e7eSjoerg 
397*06f32e7eSjoerg std::unique_ptr<IPDBEnumSymbols>
findChildren(PDB_SymType Type) const398*06f32e7eSjoerg DIARawSymbol::findChildren(PDB_SymType Type) const {
399*06f32e7eSjoerg   enum SymTagEnum EnumVal = static_cast<enum SymTagEnum>(Type);
400*06f32e7eSjoerg 
401*06f32e7eSjoerg   CComPtr<IDiaEnumSymbols> DiaEnumerator;
402*06f32e7eSjoerg   if (S_OK !=
403*06f32e7eSjoerg       Symbol->findChildrenEx(EnumVal, nullptr, nsNone, &DiaEnumerator)) {
404*06f32e7eSjoerg     if (S_OK != Symbol->findChildren(EnumVal, nullptr, nsNone, &DiaEnumerator))
405*06f32e7eSjoerg       return nullptr;
406*06f32e7eSjoerg   }
407*06f32e7eSjoerg 
408*06f32e7eSjoerg   return std::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
409*06f32e7eSjoerg }
410*06f32e7eSjoerg 
411*06f32e7eSjoerg std::unique_ptr<IPDBEnumSymbols>
findChildren(PDB_SymType Type,StringRef Name,PDB_NameSearchFlags Flags) const412*06f32e7eSjoerg DIARawSymbol::findChildren(PDB_SymType Type, StringRef Name,
413*06f32e7eSjoerg                            PDB_NameSearchFlags Flags) const {
414*06f32e7eSjoerg   llvm::SmallVector<UTF16, 32> Name16;
415*06f32e7eSjoerg   llvm::convertUTF8ToUTF16String(Name, Name16);
416*06f32e7eSjoerg 
417*06f32e7eSjoerg   enum SymTagEnum EnumVal = static_cast<enum SymTagEnum>(Type);
418*06f32e7eSjoerg   DWORD CompareFlags = static_cast<DWORD>(Flags);
419*06f32e7eSjoerg   wchar_t *Name16Str = reinterpret_cast<wchar_t *>(Name16.data());
420*06f32e7eSjoerg 
421*06f32e7eSjoerg   CComPtr<IDiaEnumSymbols> DiaEnumerator;
422*06f32e7eSjoerg   if (S_OK !=
423*06f32e7eSjoerg       Symbol->findChildrenEx(EnumVal, Name16Str, CompareFlags, &DiaEnumerator))
424*06f32e7eSjoerg     return nullptr;
425*06f32e7eSjoerg 
426*06f32e7eSjoerg   return std::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
427*06f32e7eSjoerg }
428*06f32e7eSjoerg 
429*06f32e7eSjoerg std::unique_ptr<IPDBEnumSymbols>
findChildrenByAddr(PDB_SymType Type,StringRef Name,PDB_NameSearchFlags Flags,uint32_t Section,uint32_t Offset) const430*06f32e7eSjoerg DIARawSymbol::findChildrenByAddr(PDB_SymType Type, StringRef Name,
431*06f32e7eSjoerg                                  PDB_NameSearchFlags Flags, uint32_t Section,
432*06f32e7eSjoerg                                  uint32_t Offset) const {
433*06f32e7eSjoerg   llvm::SmallVector<UTF16, 32> Name16;
434*06f32e7eSjoerg   llvm::convertUTF8ToUTF16String(Name, Name16);
435*06f32e7eSjoerg 
436*06f32e7eSjoerg   enum SymTagEnum EnumVal = static_cast<enum SymTagEnum>(Type);
437*06f32e7eSjoerg 
438*06f32e7eSjoerg   DWORD CompareFlags = static_cast<DWORD>(Flags);
439*06f32e7eSjoerg   wchar_t *Name16Str = reinterpret_cast<wchar_t *>(Name16.data());
440*06f32e7eSjoerg 
441*06f32e7eSjoerg   CComPtr<IDiaEnumSymbols> DiaEnumerator;
442*06f32e7eSjoerg   if (S_OK != Symbol->findChildrenExByAddr(EnumVal, Name16Str, CompareFlags,
443*06f32e7eSjoerg                                            Section, Offset, &DiaEnumerator))
444*06f32e7eSjoerg     return nullptr;
445*06f32e7eSjoerg 
446*06f32e7eSjoerg   return std::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
447*06f32e7eSjoerg }
448*06f32e7eSjoerg 
449*06f32e7eSjoerg std::unique_ptr<IPDBEnumSymbols>
findChildrenByVA(PDB_SymType Type,StringRef Name,PDB_NameSearchFlags Flags,uint64_t VA) const450*06f32e7eSjoerg DIARawSymbol::findChildrenByVA(PDB_SymType Type, StringRef Name,
451*06f32e7eSjoerg                                PDB_NameSearchFlags Flags, uint64_t VA) const {
452*06f32e7eSjoerg   llvm::SmallVector<UTF16, 32> Name16;
453*06f32e7eSjoerg   llvm::convertUTF8ToUTF16String(Name, Name16);
454*06f32e7eSjoerg 
455*06f32e7eSjoerg   enum SymTagEnum EnumVal = static_cast<enum SymTagEnum>(Type);
456*06f32e7eSjoerg 
457*06f32e7eSjoerg   DWORD CompareFlags = static_cast<DWORD>(Flags);
458*06f32e7eSjoerg   wchar_t *Name16Str = reinterpret_cast<wchar_t *>(Name16.data());
459*06f32e7eSjoerg 
460*06f32e7eSjoerg   CComPtr<IDiaEnumSymbols> DiaEnumerator;
461*06f32e7eSjoerg   if (S_OK != Symbol->findChildrenExByVA(EnumVal, Name16Str, CompareFlags, VA,
462*06f32e7eSjoerg                                          &DiaEnumerator))
463*06f32e7eSjoerg     return nullptr;
464*06f32e7eSjoerg 
465*06f32e7eSjoerg   return std::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
466*06f32e7eSjoerg }
467*06f32e7eSjoerg 
468*06f32e7eSjoerg std::unique_ptr<IPDBEnumSymbols>
findChildrenByRVA(PDB_SymType Type,StringRef Name,PDB_NameSearchFlags Flags,uint32_t RVA) const469*06f32e7eSjoerg DIARawSymbol::findChildrenByRVA(PDB_SymType Type, StringRef Name,
470*06f32e7eSjoerg                                 PDB_NameSearchFlags Flags, uint32_t RVA) const {
471*06f32e7eSjoerg   llvm::SmallVector<UTF16, 32> Name16;
472*06f32e7eSjoerg   llvm::convertUTF8ToUTF16String(Name, Name16);
473*06f32e7eSjoerg 
474*06f32e7eSjoerg   enum SymTagEnum EnumVal = static_cast<enum SymTagEnum>(Type);
475*06f32e7eSjoerg   DWORD CompareFlags = static_cast<DWORD>(Flags);
476*06f32e7eSjoerg   wchar_t *Name16Str = reinterpret_cast<wchar_t *>(Name16.data());
477*06f32e7eSjoerg 
478*06f32e7eSjoerg   CComPtr<IDiaEnumSymbols> DiaEnumerator;
479*06f32e7eSjoerg   if (S_OK != Symbol->findChildrenExByRVA(EnumVal, Name16Str, CompareFlags, RVA,
480*06f32e7eSjoerg                                           &DiaEnumerator))
481*06f32e7eSjoerg     return nullptr;
482*06f32e7eSjoerg 
483*06f32e7eSjoerg   return std::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
484*06f32e7eSjoerg }
485*06f32e7eSjoerg 
486*06f32e7eSjoerg std::unique_ptr<IPDBEnumSymbols>
findInlineFramesByAddr(uint32_t Section,uint32_t Offset) const487*06f32e7eSjoerg DIARawSymbol::findInlineFramesByAddr(uint32_t Section, uint32_t Offset) const {
488*06f32e7eSjoerg   CComPtr<IDiaEnumSymbols> DiaEnumerator;
489*06f32e7eSjoerg   if (S_OK != Symbol->findInlineFramesByAddr(Section, Offset, &DiaEnumerator))
490*06f32e7eSjoerg     return nullptr;
491*06f32e7eSjoerg 
492*06f32e7eSjoerg   return std::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
493*06f32e7eSjoerg }
494*06f32e7eSjoerg 
495*06f32e7eSjoerg std::unique_ptr<IPDBEnumSymbols>
findInlineFramesByRVA(uint32_t RVA) const496*06f32e7eSjoerg DIARawSymbol::findInlineFramesByRVA(uint32_t RVA) const {
497*06f32e7eSjoerg   CComPtr<IDiaEnumSymbols> DiaEnumerator;
498*06f32e7eSjoerg   if (S_OK != Symbol->findInlineFramesByRVA(RVA, &DiaEnumerator))
499*06f32e7eSjoerg     return nullptr;
500*06f32e7eSjoerg 
501*06f32e7eSjoerg   return std::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
502*06f32e7eSjoerg }
503*06f32e7eSjoerg 
504*06f32e7eSjoerg std::unique_ptr<IPDBEnumSymbols>
findInlineFramesByVA(uint64_t VA) const505*06f32e7eSjoerg DIARawSymbol::findInlineFramesByVA(uint64_t VA) const {
506*06f32e7eSjoerg   CComPtr<IDiaEnumSymbols> DiaEnumerator;
507*06f32e7eSjoerg   if (S_OK != Symbol->findInlineFramesByVA(VA, &DiaEnumerator))
508*06f32e7eSjoerg     return nullptr;
509*06f32e7eSjoerg 
510*06f32e7eSjoerg   return std::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
511*06f32e7eSjoerg }
512*06f32e7eSjoerg 
findInlineeLines() const513*06f32e7eSjoerg std::unique_ptr<IPDBEnumLineNumbers> DIARawSymbol::findInlineeLines() const {
514*06f32e7eSjoerg   CComPtr<IDiaEnumLineNumbers> DiaEnumerator;
515*06f32e7eSjoerg   if (S_OK != Symbol->findInlineeLines(&DiaEnumerator))
516*06f32e7eSjoerg     return nullptr;
517*06f32e7eSjoerg 
518*06f32e7eSjoerg   return std::make_unique<DIAEnumLineNumbers>(DiaEnumerator);
519*06f32e7eSjoerg }
520*06f32e7eSjoerg 
521*06f32e7eSjoerg std::unique_ptr<IPDBEnumLineNumbers>
findInlineeLinesByAddr(uint32_t Section,uint32_t Offset,uint32_t Length) const522*06f32e7eSjoerg DIARawSymbol::findInlineeLinesByAddr(uint32_t Section, uint32_t Offset,
523*06f32e7eSjoerg                                      uint32_t Length) const {
524*06f32e7eSjoerg   CComPtr<IDiaEnumLineNumbers> DiaEnumerator;
525*06f32e7eSjoerg   if (S_OK !=
526*06f32e7eSjoerg       Symbol->findInlineeLinesByAddr(Section, Offset, Length, &DiaEnumerator))
527*06f32e7eSjoerg     return nullptr;
528*06f32e7eSjoerg 
529*06f32e7eSjoerg   return std::make_unique<DIAEnumLineNumbers>(DiaEnumerator);
530*06f32e7eSjoerg }
531*06f32e7eSjoerg 
532*06f32e7eSjoerg std::unique_ptr<IPDBEnumLineNumbers>
findInlineeLinesByRVA(uint32_t RVA,uint32_t Length) const533*06f32e7eSjoerg DIARawSymbol::findInlineeLinesByRVA(uint32_t RVA, uint32_t Length) const {
534*06f32e7eSjoerg   CComPtr<IDiaEnumLineNumbers> DiaEnumerator;
535*06f32e7eSjoerg   if (S_OK != Symbol->findInlineeLinesByRVA(RVA, Length, &DiaEnumerator))
536*06f32e7eSjoerg     return nullptr;
537*06f32e7eSjoerg 
538*06f32e7eSjoerg   return std::make_unique<DIAEnumLineNumbers>(DiaEnumerator);
539*06f32e7eSjoerg }
540*06f32e7eSjoerg 
541*06f32e7eSjoerg std::unique_ptr<IPDBEnumLineNumbers>
findInlineeLinesByVA(uint64_t VA,uint32_t Length) const542*06f32e7eSjoerg DIARawSymbol::findInlineeLinesByVA(uint64_t VA, uint32_t Length) const {
543*06f32e7eSjoerg   CComPtr<IDiaEnumLineNumbers> DiaEnumerator;
544*06f32e7eSjoerg   if (S_OK != Symbol->findInlineeLinesByVA(VA, Length, &DiaEnumerator))
545*06f32e7eSjoerg     return nullptr;
546*06f32e7eSjoerg 
547*06f32e7eSjoerg   return std::make_unique<DIAEnumLineNumbers>(DiaEnumerator);
548*06f32e7eSjoerg }
549*06f32e7eSjoerg 
getDataBytes(llvm::SmallVector<uint8_t,32> & bytes) const550*06f32e7eSjoerg void DIARawSymbol::getDataBytes(llvm::SmallVector<uint8_t, 32> &bytes) const {
551*06f32e7eSjoerg   bytes.clear();
552*06f32e7eSjoerg 
553*06f32e7eSjoerg   DWORD DataSize = 0;
554*06f32e7eSjoerg   Symbol->get_dataBytes(0, &DataSize, nullptr);
555*06f32e7eSjoerg   if (DataSize == 0)
556*06f32e7eSjoerg     return;
557*06f32e7eSjoerg 
558*06f32e7eSjoerg   bytes.resize(DataSize);
559*06f32e7eSjoerg   Symbol->get_dataBytes(DataSize, &DataSize, bytes.data());
560*06f32e7eSjoerg }
561*06f32e7eSjoerg 
getUndecoratedNameEx(PDB_UndnameFlags Flags) const562*06f32e7eSjoerg std::string DIARawSymbol::getUndecoratedNameEx(PDB_UndnameFlags Flags) const {
563*06f32e7eSjoerg   CComBSTR Result16;
564*06f32e7eSjoerg   if (S_OK != Symbol->get_undecoratedNameEx((DWORD)Flags, &Result16))
565*06f32e7eSjoerg     return std::string();
566*06f32e7eSjoerg 
567*06f32e7eSjoerg   const char *SrcBytes = reinterpret_cast<const char *>(Result16.m_str);
568*06f32e7eSjoerg   llvm::ArrayRef<char> SrcByteArray(SrcBytes, Result16.ByteLength());
569*06f32e7eSjoerg   std::string Result8;
570*06f32e7eSjoerg   if (!llvm::convertUTF16ToUTF8String(SrcByteArray, Result8))
571*06f32e7eSjoerg     return std::string();
572*06f32e7eSjoerg   return Result8;
573*06f32e7eSjoerg }
574*06f32e7eSjoerg 
getAccess() const575*06f32e7eSjoerg PDB_MemberAccess DIARawSymbol::getAccess() const {
576*06f32e7eSjoerg   return PrivateGetDIAValue<DWORD, PDB_MemberAccess>(Symbol,
577*06f32e7eSjoerg                                                      &IDiaSymbol::get_access);
578*06f32e7eSjoerg }
579*06f32e7eSjoerg 
getAddressOffset() const580*06f32e7eSjoerg uint32_t DIARawSymbol::getAddressOffset() const {
581*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_addressOffset);
582*06f32e7eSjoerg }
583*06f32e7eSjoerg 
getAddressSection() const584*06f32e7eSjoerg uint32_t DIARawSymbol::getAddressSection() const {
585*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_addressSection);
586*06f32e7eSjoerg }
587*06f32e7eSjoerg 
getAge() const588*06f32e7eSjoerg uint32_t DIARawSymbol::getAge() const {
589*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_age);
590*06f32e7eSjoerg }
591*06f32e7eSjoerg 
getArrayIndexTypeId() const592*06f32e7eSjoerg SymIndexId DIARawSymbol::getArrayIndexTypeId() const {
593*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_arrayIndexTypeId);
594*06f32e7eSjoerg }
595*06f32e7eSjoerg 
getBackEndVersion(VersionInfo & Version) const596*06f32e7eSjoerg void DIARawSymbol::getBackEndVersion(VersionInfo &Version) const {
597*06f32e7eSjoerg   Version.Major = PrivateGetDIAValue(Symbol, &IDiaSymbol::get_backEndMajor);
598*06f32e7eSjoerg   Version.Minor = PrivateGetDIAValue(Symbol, &IDiaSymbol::get_backEndMinor);
599*06f32e7eSjoerg   Version.Build = PrivateGetDIAValue(Symbol, &IDiaSymbol::get_backEndBuild);
600*06f32e7eSjoerg   Version.QFE = PrivateGetDIAValue(Symbol, &IDiaSymbol::get_backEndQFE);
601*06f32e7eSjoerg }
602*06f32e7eSjoerg 
getBaseDataOffset() const603*06f32e7eSjoerg uint32_t DIARawSymbol::getBaseDataOffset() const {
604*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_baseDataOffset);
605*06f32e7eSjoerg }
606*06f32e7eSjoerg 
getBaseDataSlot() const607*06f32e7eSjoerg uint32_t DIARawSymbol::getBaseDataSlot() const {
608*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_baseDataSlot);
609*06f32e7eSjoerg }
610*06f32e7eSjoerg 
getBaseSymbolId() const611*06f32e7eSjoerg SymIndexId DIARawSymbol::getBaseSymbolId() const {
612*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_baseSymbolId);
613*06f32e7eSjoerg }
614*06f32e7eSjoerg 
getBuiltinType() const615*06f32e7eSjoerg PDB_BuiltinType DIARawSymbol::getBuiltinType() const {
616*06f32e7eSjoerg   return PrivateGetDIAValue<DWORD, PDB_BuiltinType>(Symbol,
617*06f32e7eSjoerg                                                     &IDiaSymbol::get_baseType);
618*06f32e7eSjoerg }
619*06f32e7eSjoerg 
getBitPosition() const620*06f32e7eSjoerg uint32_t DIARawSymbol::getBitPosition() const {
621*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_bitPosition);
622*06f32e7eSjoerg }
623*06f32e7eSjoerg 
getCallingConvention() const624*06f32e7eSjoerg PDB_CallingConv DIARawSymbol::getCallingConvention() const {
625*06f32e7eSjoerg   return PrivateGetDIAValue<DWORD, PDB_CallingConv>(
626*06f32e7eSjoerg       Symbol, &IDiaSymbol::get_callingConvention);
627*06f32e7eSjoerg }
628*06f32e7eSjoerg 
getClassParentId() const629*06f32e7eSjoerg SymIndexId DIARawSymbol::getClassParentId() const {
630*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_classParentId);
631*06f32e7eSjoerg }
632*06f32e7eSjoerg 
getCompilerName() const633*06f32e7eSjoerg std::string DIARawSymbol::getCompilerName() const {
634*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_compilerName);
635*06f32e7eSjoerg }
636*06f32e7eSjoerg 
getCount() const637*06f32e7eSjoerg uint32_t DIARawSymbol::getCount() const {
638*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_count);
639*06f32e7eSjoerg }
640*06f32e7eSjoerg 
getCountLiveRanges() const641*06f32e7eSjoerg uint32_t DIARawSymbol::getCountLiveRanges() const {
642*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_countLiveRanges);
643*06f32e7eSjoerg }
644*06f32e7eSjoerg 
getFrontEndVersion(VersionInfo & Version) const645*06f32e7eSjoerg void DIARawSymbol::getFrontEndVersion(VersionInfo &Version) const {
646*06f32e7eSjoerg   Version.Major = PrivateGetDIAValue(Symbol, &IDiaSymbol::get_frontEndMajor);
647*06f32e7eSjoerg   Version.Minor = PrivateGetDIAValue(Symbol, &IDiaSymbol::get_frontEndMinor);
648*06f32e7eSjoerg   Version.Build = PrivateGetDIAValue(Symbol, &IDiaSymbol::get_frontEndBuild);
649*06f32e7eSjoerg   Version.QFE = PrivateGetDIAValue(Symbol, &IDiaSymbol::get_frontEndQFE);
650*06f32e7eSjoerg }
651*06f32e7eSjoerg 
getLanguage() const652*06f32e7eSjoerg PDB_Lang DIARawSymbol::getLanguage() const {
653*06f32e7eSjoerg   return PrivateGetDIAValue<DWORD, PDB_Lang>(Symbol, &IDiaSymbol::get_language);
654*06f32e7eSjoerg }
655*06f32e7eSjoerg 
getLexicalParentId() const656*06f32e7eSjoerg SymIndexId DIARawSymbol::getLexicalParentId() const {
657*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_lexicalParentId);
658*06f32e7eSjoerg }
659*06f32e7eSjoerg 
getLibraryName() const660*06f32e7eSjoerg std::string DIARawSymbol::getLibraryName() const {
661*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_libraryName);
662*06f32e7eSjoerg }
663*06f32e7eSjoerg 
getLiveRangeStartAddressOffset() const664*06f32e7eSjoerg uint32_t DIARawSymbol::getLiveRangeStartAddressOffset() const {
665*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol,
666*06f32e7eSjoerg                             &IDiaSymbol::get_liveRangeStartAddressOffset);
667*06f32e7eSjoerg }
668*06f32e7eSjoerg 
getLiveRangeStartAddressSection() const669*06f32e7eSjoerg uint32_t DIARawSymbol::getLiveRangeStartAddressSection() const {
670*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol,
671*06f32e7eSjoerg                             &IDiaSymbol::get_liveRangeStartAddressSection);
672*06f32e7eSjoerg }
673*06f32e7eSjoerg 
getLiveRangeStartRelativeVirtualAddress() const674*06f32e7eSjoerg uint32_t DIARawSymbol::getLiveRangeStartRelativeVirtualAddress() const {
675*06f32e7eSjoerg   return PrivateGetDIAValue(
676*06f32e7eSjoerg       Symbol, &IDiaSymbol::get_liveRangeStartRelativeVirtualAddress);
677*06f32e7eSjoerg }
678*06f32e7eSjoerg 
getLocalBasePointerRegisterId() const679*06f32e7eSjoerg codeview::RegisterId DIARawSymbol::getLocalBasePointerRegisterId() const {
680*06f32e7eSjoerg   return PrivateGetDIAValue<DWORD, codeview::RegisterId>(
681*06f32e7eSjoerg       Symbol, &IDiaSymbol::get_localBasePointerRegisterId);
682*06f32e7eSjoerg }
683*06f32e7eSjoerg 
getLowerBoundId() const684*06f32e7eSjoerg SymIndexId DIARawSymbol::getLowerBoundId() const {
685*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_lowerBoundId);
686*06f32e7eSjoerg }
687*06f32e7eSjoerg 
getMemorySpaceKind() const688*06f32e7eSjoerg uint32_t DIARawSymbol::getMemorySpaceKind() const {
689*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_memorySpaceKind);
690*06f32e7eSjoerg }
691*06f32e7eSjoerg 
getName() const692*06f32e7eSjoerg std::string DIARawSymbol::getName() const {
693*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_name);
694*06f32e7eSjoerg }
695*06f32e7eSjoerg 
getNumberOfAcceleratorPointerTags() const696*06f32e7eSjoerg uint32_t DIARawSymbol::getNumberOfAcceleratorPointerTags() const {
697*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol,
698*06f32e7eSjoerg                             &IDiaSymbol::get_numberOfAcceleratorPointerTags);
699*06f32e7eSjoerg }
700*06f32e7eSjoerg 
getNumberOfColumns() const701*06f32e7eSjoerg uint32_t DIARawSymbol::getNumberOfColumns() const {
702*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_numberOfColumns);
703*06f32e7eSjoerg }
704*06f32e7eSjoerg 
getNumberOfModifiers() const705*06f32e7eSjoerg uint32_t DIARawSymbol::getNumberOfModifiers() const {
706*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_numberOfModifiers);
707*06f32e7eSjoerg }
708*06f32e7eSjoerg 
getNumberOfRegisterIndices() const709*06f32e7eSjoerg uint32_t DIARawSymbol::getNumberOfRegisterIndices() const {
710*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_numberOfRegisterIndices);
711*06f32e7eSjoerg }
712*06f32e7eSjoerg 
getNumberOfRows() const713*06f32e7eSjoerg uint32_t DIARawSymbol::getNumberOfRows() const {
714*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_numberOfRows);
715*06f32e7eSjoerg }
716*06f32e7eSjoerg 
getObjectFileName() const717*06f32e7eSjoerg std::string DIARawSymbol::getObjectFileName() const {
718*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_objectFileName);
719*06f32e7eSjoerg }
720*06f32e7eSjoerg 
getOemId() const721*06f32e7eSjoerg uint32_t DIARawSymbol::getOemId() const {
722*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_oemId);
723*06f32e7eSjoerg }
724*06f32e7eSjoerg 
getOemSymbolId() const725*06f32e7eSjoerg SymIndexId DIARawSymbol::getOemSymbolId() const {
726*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_oemSymbolId);
727*06f32e7eSjoerg }
728*06f32e7eSjoerg 
getOffsetInUdt() const729*06f32e7eSjoerg uint32_t DIARawSymbol::getOffsetInUdt() const {
730*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_offsetInUdt);
731*06f32e7eSjoerg }
732*06f32e7eSjoerg 
getPlatform() const733*06f32e7eSjoerg PDB_Cpu DIARawSymbol::getPlatform() const {
734*06f32e7eSjoerg   return PrivateGetDIAValue<DWORD, PDB_Cpu>(Symbol, &IDiaSymbol::get_platform);
735*06f32e7eSjoerg }
736*06f32e7eSjoerg 
getRank() const737*06f32e7eSjoerg uint32_t DIARawSymbol::getRank() const {
738*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_rank);
739*06f32e7eSjoerg }
740*06f32e7eSjoerg 
getRegisterId() const741*06f32e7eSjoerg codeview::RegisterId DIARawSymbol::getRegisterId() const {
742*06f32e7eSjoerg   return PrivateGetDIAValue<DWORD, codeview::RegisterId>(
743*06f32e7eSjoerg       Symbol, &IDiaSymbol::get_registerId);
744*06f32e7eSjoerg }
745*06f32e7eSjoerg 
getRegisterType() const746*06f32e7eSjoerg uint32_t DIARawSymbol::getRegisterType() const {
747*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_registerType);
748*06f32e7eSjoerg }
749*06f32e7eSjoerg 
getRelativeVirtualAddress() const750*06f32e7eSjoerg uint32_t DIARawSymbol::getRelativeVirtualAddress() const {
751*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_relativeVirtualAddress);
752*06f32e7eSjoerg }
753*06f32e7eSjoerg 
getSamplerSlot() const754*06f32e7eSjoerg uint32_t DIARawSymbol::getSamplerSlot() const {
755*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_samplerSlot);
756*06f32e7eSjoerg }
757*06f32e7eSjoerg 
getSignature() const758*06f32e7eSjoerg uint32_t DIARawSymbol::getSignature() const {
759*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_signature);
760*06f32e7eSjoerg }
761*06f32e7eSjoerg 
getSizeInUdt() const762*06f32e7eSjoerg uint32_t DIARawSymbol::getSizeInUdt() const {
763*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_sizeInUdt);
764*06f32e7eSjoerg }
765*06f32e7eSjoerg 
getSlot() const766*06f32e7eSjoerg uint32_t DIARawSymbol::getSlot() const {
767*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_slot);
768*06f32e7eSjoerg }
769*06f32e7eSjoerg 
getSourceFileName() const770*06f32e7eSjoerg std::string DIARawSymbol::getSourceFileName() const {
771*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_sourceFileName);
772*06f32e7eSjoerg }
773*06f32e7eSjoerg 
getSrcLineOnTypeDefn() const774*06f32e7eSjoerg std::unique_ptr<IPDBLineNumber> DIARawSymbol::getSrcLineOnTypeDefn() const {
775*06f32e7eSjoerg   CComPtr<IDiaLineNumber> LineNumber;
776*06f32e7eSjoerg   if (FAILED(Symbol->getSrcLineOnTypeDefn(&LineNumber)) || !LineNumber)
777*06f32e7eSjoerg     return nullptr;
778*06f32e7eSjoerg 
779*06f32e7eSjoerg   return std::make_unique<DIALineNumber>(LineNumber);
780*06f32e7eSjoerg }
781*06f32e7eSjoerg 
getStride() const782*06f32e7eSjoerg uint32_t DIARawSymbol::getStride() const {
783*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_stride);
784*06f32e7eSjoerg }
785*06f32e7eSjoerg 
getSubTypeId() const786*06f32e7eSjoerg SymIndexId DIARawSymbol::getSubTypeId() const {
787*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_subTypeId);
788*06f32e7eSjoerg }
789*06f32e7eSjoerg 
getSymbolsFileName() const790*06f32e7eSjoerg std::string DIARawSymbol::getSymbolsFileName() const {
791*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_symbolsFileName);
792*06f32e7eSjoerg }
793*06f32e7eSjoerg 
getSymIndexId() const794*06f32e7eSjoerg SymIndexId DIARawSymbol::getSymIndexId() const {
795*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_symIndexId);
796*06f32e7eSjoerg }
797*06f32e7eSjoerg 
getTargetOffset() const798*06f32e7eSjoerg uint32_t DIARawSymbol::getTargetOffset() const {
799*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_targetOffset);
800*06f32e7eSjoerg }
801*06f32e7eSjoerg 
getTargetRelativeVirtualAddress() const802*06f32e7eSjoerg uint32_t DIARawSymbol::getTargetRelativeVirtualAddress() const {
803*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol,
804*06f32e7eSjoerg                             &IDiaSymbol::get_targetRelativeVirtualAddress);
805*06f32e7eSjoerg }
806*06f32e7eSjoerg 
getTargetVirtualAddress() const807*06f32e7eSjoerg uint64_t DIARawSymbol::getTargetVirtualAddress() const {
808*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_targetVirtualAddress);
809*06f32e7eSjoerg }
810*06f32e7eSjoerg 
getTargetSection() const811*06f32e7eSjoerg uint32_t DIARawSymbol::getTargetSection() const {
812*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_targetSection);
813*06f32e7eSjoerg }
814*06f32e7eSjoerg 
getTextureSlot() const815*06f32e7eSjoerg uint32_t DIARawSymbol::getTextureSlot() const {
816*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_textureSlot);
817*06f32e7eSjoerg }
818*06f32e7eSjoerg 
getTimeStamp() const819*06f32e7eSjoerg uint32_t DIARawSymbol::getTimeStamp() const {
820*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_timeStamp);
821*06f32e7eSjoerg }
822*06f32e7eSjoerg 
getToken() const823*06f32e7eSjoerg uint32_t DIARawSymbol::getToken() const {
824*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_token);
825*06f32e7eSjoerg }
826*06f32e7eSjoerg 
getTypeId() const827*06f32e7eSjoerg SymIndexId DIARawSymbol::getTypeId() const {
828*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_typeId);
829*06f32e7eSjoerg }
830*06f32e7eSjoerg 
getUavSlot() const831*06f32e7eSjoerg uint32_t DIARawSymbol::getUavSlot() const {
832*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_uavSlot);
833*06f32e7eSjoerg }
834*06f32e7eSjoerg 
getUndecoratedName() const835*06f32e7eSjoerg std::string DIARawSymbol::getUndecoratedName() const {
836*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_undecoratedName);
837*06f32e7eSjoerg }
838*06f32e7eSjoerg 
getUnmodifiedTypeId() const839*06f32e7eSjoerg SymIndexId DIARawSymbol::getUnmodifiedTypeId() const {
840*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_unmodifiedTypeId);
841*06f32e7eSjoerg }
842*06f32e7eSjoerg 
getUpperBoundId() const843*06f32e7eSjoerg SymIndexId DIARawSymbol::getUpperBoundId() const {
844*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_upperBoundId);
845*06f32e7eSjoerg }
846*06f32e7eSjoerg 
getValue() const847*06f32e7eSjoerg Variant DIARawSymbol::getValue() const {
848*06f32e7eSjoerg   VARIANT Value;
849*06f32e7eSjoerg   Value.vt = VT_EMPTY;
850*06f32e7eSjoerg   if (S_OK != Symbol->get_value(&Value))
851*06f32e7eSjoerg     return Variant();
852*06f32e7eSjoerg 
853*06f32e7eSjoerg   return VariantFromVARIANT(Value);
854*06f32e7eSjoerg }
855*06f32e7eSjoerg 
getVirtualBaseDispIndex() const856*06f32e7eSjoerg uint32_t DIARawSymbol::getVirtualBaseDispIndex() const {
857*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtualBaseDispIndex);
858*06f32e7eSjoerg }
859*06f32e7eSjoerg 
getVirtualBaseOffset() const860*06f32e7eSjoerg uint32_t DIARawSymbol::getVirtualBaseOffset() const {
861*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtualBaseOffset);
862*06f32e7eSjoerg }
863*06f32e7eSjoerg 
getVirtualTableShapeId() const864*06f32e7eSjoerg SymIndexId DIARawSymbol::getVirtualTableShapeId() const {
865*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtualTableShapeId);
866*06f32e7eSjoerg }
867*06f32e7eSjoerg 
868*06f32e7eSjoerg std::unique_ptr<PDBSymbolTypeBuiltin>
getVirtualBaseTableType() const869*06f32e7eSjoerg DIARawSymbol::getVirtualBaseTableType() const {
870*06f32e7eSjoerg   CComPtr<IDiaSymbol> TableType;
871*06f32e7eSjoerg   if (FAILED(Symbol->get_virtualBaseTableType(&TableType)) || !TableType)
872*06f32e7eSjoerg     return nullptr;
873*06f32e7eSjoerg 
874*06f32e7eSjoerg   auto RawVT = std::make_unique<DIARawSymbol>(Session, TableType);
875*06f32e7eSjoerg   auto Pointer =
876*06f32e7eSjoerg       PDBSymbol::createAs<PDBSymbolTypePointer>(Session, std::move(RawVT));
877*06f32e7eSjoerg   return unique_dyn_cast<PDBSymbolTypeBuiltin>(Pointer->getPointeeType());
878*06f32e7eSjoerg }
879*06f32e7eSjoerg 
getDataKind() const880*06f32e7eSjoerg PDB_DataKind DIARawSymbol::getDataKind() const {
881*06f32e7eSjoerg   return PrivateGetDIAValue<DWORD, PDB_DataKind>(Symbol,
882*06f32e7eSjoerg                                                  &IDiaSymbol::get_dataKind);
883*06f32e7eSjoerg }
884*06f32e7eSjoerg 
getSymTag() const885*06f32e7eSjoerg PDB_SymType DIARawSymbol::getSymTag() const {
886*06f32e7eSjoerg   return PrivateGetDIAValue<DWORD, PDB_SymType>(Symbol,
887*06f32e7eSjoerg                                                 &IDiaSymbol::get_symTag);
888*06f32e7eSjoerg }
889*06f32e7eSjoerg 
getGuid() const890*06f32e7eSjoerg codeview::GUID DIARawSymbol::getGuid() const {
891*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_guid);
892*06f32e7eSjoerg }
893*06f32e7eSjoerg 
getOffset() const894*06f32e7eSjoerg int32_t DIARawSymbol::getOffset() const {
895*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_offset);
896*06f32e7eSjoerg }
897*06f32e7eSjoerg 
getThisAdjust() const898*06f32e7eSjoerg int32_t DIARawSymbol::getThisAdjust() const {
899*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_thisAdjust);
900*06f32e7eSjoerg }
901*06f32e7eSjoerg 
getVirtualBasePointerOffset() const902*06f32e7eSjoerg int32_t DIARawSymbol::getVirtualBasePointerOffset() const {
903*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtualBasePointerOffset);
904*06f32e7eSjoerg }
905*06f32e7eSjoerg 
getLocationType() const906*06f32e7eSjoerg PDB_LocType DIARawSymbol::getLocationType() const {
907*06f32e7eSjoerg   return PrivateGetDIAValue<DWORD, PDB_LocType>(Symbol,
908*06f32e7eSjoerg                                                 &IDiaSymbol::get_locationType);
909*06f32e7eSjoerg }
910*06f32e7eSjoerg 
getMachineType() const911*06f32e7eSjoerg PDB_Machine DIARawSymbol::getMachineType() const {
912*06f32e7eSjoerg   return PrivateGetDIAValue<DWORD, PDB_Machine>(Symbol,
913*06f32e7eSjoerg                                                 &IDiaSymbol::get_machineType);
914*06f32e7eSjoerg }
915*06f32e7eSjoerg 
getThunkOrdinal() const916*06f32e7eSjoerg codeview::ThunkOrdinal DIARawSymbol::getThunkOrdinal() const {
917*06f32e7eSjoerg   return PrivateGetDIAValue<DWORD, codeview::ThunkOrdinal>(
918*06f32e7eSjoerg       Symbol, &IDiaSymbol::get_thunkOrdinal);
919*06f32e7eSjoerg }
920*06f32e7eSjoerg 
getLength() const921*06f32e7eSjoerg uint64_t DIARawSymbol::getLength() const {
922*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_length);
923*06f32e7eSjoerg }
924*06f32e7eSjoerg 
getLiveRangeLength() const925*06f32e7eSjoerg uint64_t DIARawSymbol::getLiveRangeLength() const {
926*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_liveRangeLength);
927*06f32e7eSjoerg }
928*06f32e7eSjoerg 
getVirtualAddress() const929*06f32e7eSjoerg uint64_t DIARawSymbol::getVirtualAddress() const {
930*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtualAddress);
931*06f32e7eSjoerg }
932*06f32e7eSjoerg 
getUdtKind() const933*06f32e7eSjoerg PDB_UdtType DIARawSymbol::getUdtKind() const {
934*06f32e7eSjoerg   return PrivateGetDIAValue<DWORD, PDB_UdtType>(Symbol,
935*06f32e7eSjoerg                                                 &IDiaSymbol::get_udtKind);
936*06f32e7eSjoerg }
937*06f32e7eSjoerg 
hasConstructor() const938*06f32e7eSjoerg bool DIARawSymbol::hasConstructor() const {
939*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_constructor);
940*06f32e7eSjoerg }
941*06f32e7eSjoerg 
hasCustomCallingConvention() const942*06f32e7eSjoerg bool DIARawSymbol::hasCustomCallingConvention() const {
943*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_customCallingConvention);
944*06f32e7eSjoerg }
945*06f32e7eSjoerg 
hasFarReturn() const946*06f32e7eSjoerg bool DIARawSymbol::hasFarReturn() const {
947*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_farReturn);
948*06f32e7eSjoerg }
949*06f32e7eSjoerg 
isCode() const950*06f32e7eSjoerg bool DIARawSymbol::isCode() const {
951*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_code);
952*06f32e7eSjoerg }
953*06f32e7eSjoerg 
isCompilerGenerated() const954*06f32e7eSjoerg bool DIARawSymbol::isCompilerGenerated() const {
955*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_compilerGenerated);
956*06f32e7eSjoerg }
957*06f32e7eSjoerg 
isConstType() const958*06f32e7eSjoerg bool DIARawSymbol::isConstType() const {
959*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_constType);
960*06f32e7eSjoerg }
961*06f32e7eSjoerg 
isEditAndContinueEnabled() const962*06f32e7eSjoerg bool DIARawSymbol::isEditAndContinueEnabled() const {
963*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_editAndContinueEnabled);
964*06f32e7eSjoerg }
965*06f32e7eSjoerg 
isFunction() const966*06f32e7eSjoerg bool DIARawSymbol::isFunction() const {
967*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_function);
968*06f32e7eSjoerg }
969*06f32e7eSjoerg 
getAddressTaken() const970*06f32e7eSjoerg bool DIARawSymbol::getAddressTaken() const {
971*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_addressTaken);
972*06f32e7eSjoerg }
973*06f32e7eSjoerg 
getNoStackOrdering() const974*06f32e7eSjoerg bool DIARawSymbol::getNoStackOrdering() const {
975*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_noStackOrdering);
976*06f32e7eSjoerg }
977*06f32e7eSjoerg 
hasAlloca() const978*06f32e7eSjoerg bool DIARawSymbol::hasAlloca() const {
979*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasAlloca);
980*06f32e7eSjoerg }
981*06f32e7eSjoerg 
hasAssignmentOperator() const982*06f32e7eSjoerg bool DIARawSymbol::hasAssignmentOperator() const {
983*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasAssignmentOperator);
984*06f32e7eSjoerg }
985*06f32e7eSjoerg 
hasCTypes() const986*06f32e7eSjoerg bool DIARawSymbol::hasCTypes() const {
987*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isCTypes);
988*06f32e7eSjoerg }
989*06f32e7eSjoerg 
hasCastOperator() const990*06f32e7eSjoerg bool DIARawSymbol::hasCastOperator() const {
991*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasCastOperator);
992*06f32e7eSjoerg }
993*06f32e7eSjoerg 
hasDebugInfo() const994*06f32e7eSjoerg bool DIARawSymbol::hasDebugInfo() const {
995*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasDebugInfo);
996*06f32e7eSjoerg }
997*06f32e7eSjoerg 
hasEH() const998*06f32e7eSjoerg bool DIARawSymbol::hasEH() const {
999*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasEH);
1000*06f32e7eSjoerg }
1001*06f32e7eSjoerg 
hasEHa() const1002*06f32e7eSjoerg bool DIARawSymbol::hasEHa() const {
1003*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasEHa);
1004*06f32e7eSjoerg }
1005*06f32e7eSjoerg 
hasInlAsm() const1006*06f32e7eSjoerg bool DIARawSymbol::hasInlAsm() const {
1007*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasInlAsm);
1008*06f32e7eSjoerg }
1009*06f32e7eSjoerg 
hasInlineAttribute() const1010*06f32e7eSjoerg bool DIARawSymbol::hasInlineAttribute() const {
1011*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_inlSpec);
1012*06f32e7eSjoerg }
1013*06f32e7eSjoerg 
hasInterruptReturn() const1014*06f32e7eSjoerg bool DIARawSymbol::hasInterruptReturn() const {
1015*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_interruptReturn);
1016*06f32e7eSjoerg }
1017*06f32e7eSjoerg 
hasFramePointer() const1018*06f32e7eSjoerg bool DIARawSymbol::hasFramePointer() const {
1019*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_framePointerPresent);
1020*06f32e7eSjoerg }
1021*06f32e7eSjoerg 
hasLongJump() const1022*06f32e7eSjoerg bool DIARawSymbol::hasLongJump() const {
1023*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasLongJump);
1024*06f32e7eSjoerg }
1025*06f32e7eSjoerg 
hasManagedCode() const1026*06f32e7eSjoerg bool DIARawSymbol::hasManagedCode() const {
1027*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasManagedCode);
1028*06f32e7eSjoerg }
1029*06f32e7eSjoerg 
hasNestedTypes() const1030*06f32e7eSjoerg bool DIARawSymbol::hasNestedTypes() const {
1031*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasNestedTypes);
1032*06f32e7eSjoerg }
1033*06f32e7eSjoerg 
hasNoInlineAttribute() const1034*06f32e7eSjoerg bool DIARawSymbol::hasNoInlineAttribute() const {
1035*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_noInline);
1036*06f32e7eSjoerg }
1037*06f32e7eSjoerg 
hasNoReturnAttribute() const1038*06f32e7eSjoerg bool DIARawSymbol::hasNoReturnAttribute() const {
1039*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_noReturn);
1040*06f32e7eSjoerg }
1041*06f32e7eSjoerg 
hasOptimizedCodeDebugInfo() const1042*06f32e7eSjoerg bool DIARawSymbol::hasOptimizedCodeDebugInfo() const {
1043*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_optimizedCodeDebugInfo);
1044*06f32e7eSjoerg }
1045*06f32e7eSjoerg 
hasOverloadedOperator() const1046*06f32e7eSjoerg bool DIARawSymbol::hasOverloadedOperator() const {
1047*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_overloadedOperator);
1048*06f32e7eSjoerg }
1049*06f32e7eSjoerg 
hasSEH() const1050*06f32e7eSjoerg bool DIARawSymbol::hasSEH() const {
1051*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasSEH);
1052*06f32e7eSjoerg }
1053*06f32e7eSjoerg 
hasSecurityChecks() const1054*06f32e7eSjoerg bool DIARawSymbol::hasSecurityChecks() const {
1055*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasSecurityChecks);
1056*06f32e7eSjoerg }
1057*06f32e7eSjoerg 
hasSetJump() const1058*06f32e7eSjoerg bool DIARawSymbol::hasSetJump() const {
1059*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasSetJump);
1060*06f32e7eSjoerg }
1061*06f32e7eSjoerg 
hasStrictGSCheck() const1062*06f32e7eSjoerg bool DIARawSymbol::hasStrictGSCheck() const {
1063*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_strictGSCheck);
1064*06f32e7eSjoerg }
1065*06f32e7eSjoerg 
isAcceleratorGroupSharedLocal() const1066*06f32e7eSjoerg bool DIARawSymbol::isAcceleratorGroupSharedLocal() const {
1067*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol,
1068*06f32e7eSjoerg                             &IDiaSymbol::get_isAcceleratorGroupSharedLocal);
1069*06f32e7eSjoerg }
1070*06f32e7eSjoerg 
isAcceleratorPointerTagLiveRange() const1071*06f32e7eSjoerg bool DIARawSymbol::isAcceleratorPointerTagLiveRange() const {
1072*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol,
1073*06f32e7eSjoerg                             &IDiaSymbol::get_isAcceleratorPointerTagLiveRange);
1074*06f32e7eSjoerg }
1075*06f32e7eSjoerg 
isAcceleratorStubFunction() const1076*06f32e7eSjoerg bool DIARawSymbol::isAcceleratorStubFunction() const {
1077*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isAcceleratorStubFunction);
1078*06f32e7eSjoerg }
1079*06f32e7eSjoerg 
isAggregated() const1080*06f32e7eSjoerg bool DIARawSymbol::isAggregated() const {
1081*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isAggregated);
1082*06f32e7eSjoerg }
1083*06f32e7eSjoerg 
isIntroVirtualFunction() const1084*06f32e7eSjoerg bool DIARawSymbol::isIntroVirtualFunction() const {
1085*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_intro);
1086*06f32e7eSjoerg }
1087*06f32e7eSjoerg 
isCVTCIL() const1088*06f32e7eSjoerg bool DIARawSymbol::isCVTCIL() const {
1089*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isCVTCIL);
1090*06f32e7eSjoerg }
1091*06f32e7eSjoerg 
isConstructorVirtualBase() const1092*06f32e7eSjoerg bool DIARawSymbol::isConstructorVirtualBase() const {
1093*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isConstructorVirtualBase);
1094*06f32e7eSjoerg }
1095*06f32e7eSjoerg 
isCxxReturnUdt() const1096*06f32e7eSjoerg bool DIARawSymbol::isCxxReturnUdt() const {
1097*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isCxxReturnUdt);
1098*06f32e7eSjoerg }
1099*06f32e7eSjoerg 
isDataAligned() const1100*06f32e7eSjoerg bool DIARawSymbol::isDataAligned() const {
1101*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isDataAligned);
1102*06f32e7eSjoerg }
1103*06f32e7eSjoerg 
isHLSLData() const1104*06f32e7eSjoerg bool DIARawSymbol::isHLSLData() const {
1105*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isHLSLData);
1106*06f32e7eSjoerg }
1107*06f32e7eSjoerg 
isHotpatchable() const1108*06f32e7eSjoerg bool DIARawSymbol::isHotpatchable() const {
1109*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isHotpatchable);
1110*06f32e7eSjoerg }
1111*06f32e7eSjoerg 
isIndirectVirtualBaseClass() const1112*06f32e7eSjoerg bool DIARawSymbol::isIndirectVirtualBaseClass() const {
1113*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_indirectVirtualBaseClass);
1114*06f32e7eSjoerg }
1115*06f32e7eSjoerg 
isInterfaceUdt() const1116*06f32e7eSjoerg bool DIARawSymbol::isInterfaceUdt() const {
1117*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isInterfaceUdt);
1118*06f32e7eSjoerg }
1119*06f32e7eSjoerg 
isIntrinsic() const1120*06f32e7eSjoerg bool DIARawSymbol::isIntrinsic() const {
1121*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_intrinsic);
1122*06f32e7eSjoerg }
1123*06f32e7eSjoerg 
isLTCG() const1124*06f32e7eSjoerg bool DIARawSymbol::isLTCG() const {
1125*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isLTCG);
1126*06f32e7eSjoerg }
1127*06f32e7eSjoerg 
isLocationControlFlowDependent() const1128*06f32e7eSjoerg bool DIARawSymbol::isLocationControlFlowDependent() const {
1129*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol,
1130*06f32e7eSjoerg                             &IDiaSymbol::get_isLocationControlFlowDependent);
1131*06f32e7eSjoerg }
1132*06f32e7eSjoerg 
isMSILNetmodule() const1133*06f32e7eSjoerg bool DIARawSymbol::isMSILNetmodule() const {
1134*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isMSILNetmodule);
1135*06f32e7eSjoerg }
1136*06f32e7eSjoerg 
isMatrixRowMajor() const1137*06f32e7eSjoerg bool DIARawSymbol::isMatrixRowMajor() const {
1138*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isMatrixRowMajor);
1139*06f32e7eSjoerg }
1140*06f32e7eSjoerg 
isManagedCode() const1141*06f32e7eSjoerg bool DIARawSymbol::isManagedCode() const {
1142*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_managed);
1143*06f32e7eSjoerg }
1144*06f32e7eSjoerg 
isMSILCode() const1145*06f32e7eSjoerg bool DIARawSymbol::isMSILCode() const {
1146*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_msil);
1147*06f32e7eSjoerg }
1148*06f32e7eSjoerg 
isMultipleInheritance() const1149*06f32e7eSjoerg bool DIARawSymbol::isMultipleInheritance() const {
1150*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isMultipleInheritance);
1151*06f32e7eSjoerg }
1152*06f32e7eSjoerg 
isNaked() const1153*06f32e7eSjoerg bool DIARawSymbol::isNaked() const {
1154*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isNaked);
1155*06f32e7eSjoerg }
1156*06f32e7eSjoerg 
isNested() const1157*06f32e7eSjoerg bool DIARawSymbol::isNested() const {
1158*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_nested);
1159*06f32e7eSjoerg }
1160*06f32e7eSjoerg 
isOptimizedAway() const1161*06f32e7eSjoerg bool DIARawSymbol::isOptimizedAway() const {
1162*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isOptimizedAway);
1163*06f32e7eSjoerg }
1164*06f32e7eSjoerg 
isPacked() const1165*06f32e7eSjoerg bool DIARawSymbol::isPacked() const {
1166*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_packed);
1167*06f32e7eSjoerg }
1168*06f32e7eSjoerg 
isPointerBasedOnSymbolValue() const1169*06f32e7eSjoerg bool DIARawSymbol::isPointerBasedOnSymbolValue() const {
1170*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol,
1171*06f32e7eSjoerg                             &IDiaSymbol::get_isPointerBasedOnSymbolValue);
1172*06f32e7eSjoerg }
1173*06f32e7eSjoerg 
isPointerToDataMember() const1174*06f32e7eSjoerg bool DIARawSymbol::isPointerToDataMember() const {
1175*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isPointerToDataMember);
1176*06f32e7eSjoerg }
1177*06f32e7eSjoerg 
isPointerToMemberFunction() const1178*06f32e7eSjoerg bool DIARawSymbol::isPointerToMemberFunction() const {
1179*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isPointerToMemberFunction);
1180*06f32e7eSjoerg }
1181*06f32e7eSjoerg 
isPureVirtual() const1182*06f32e7eSjoerg bool DIARawSymbol::isPureVirtual() const {
1183*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_pure);
1184*06f32e7eSjoerg }
1185*06f32e7eSjoerg 
isRValueReference() const1186*06f32e7eSjoerg bool DIARawSymbol::isRValueReference() const {
1187*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_RValueReference);
1188*06f32e7eSjoerg }
1189*06f32e7eSjoerg 
isRefUdt() const1190*06f32e7eSjoerg bool DIARawSymbol::isRefUdt() const {
1191*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isRefUdt);
1192*06f32e7eSjoerg }
1193*06f32e7eSjoerg 
isReference() const1194*06f32e7eSjoerg bool DIARawSymbol::isReference() const {
1195*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_reference);
1196*06f32e7eSjoerg }
1197*06f32e7eSjoerg 
isRestrictedType() const1198*06f32e7eSjoerg bool DIARawSymbol::isRestrictedType() const {
1199*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_restrictedType);
1200*06f32e7eSjoerg }
1201*06f32e7eSjoerg 
isReturnValue() const1202*06f32e7eSjoerg bool DIARawSymbol::isReturnValue() const {
1203*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isReturnValue);
1204*06f32e7eSjoerg }
1205*06f32e7eSjoerg 
isSafeBuffers() const1206*06f32e7eSjoerg bool DIARawSymbol::isSafeBuffers() const {
1207*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isSafeBuffers);
1208*06f32e7eSjoerg }
1209*06f32e7eSjoerg 
isScoped() const1210*06f32e7eSjoerg bool DIARawSymbol::isScoped() const {
1211*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_scoped);
1212*06f32e7eSjoerg }
1213*06f32e7eSjoerg 
isSdl() const1214*06f32e7eSjoerg bool DIARawSymbol::isSdl() const {
1215*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isSdl);
1216*06f32e7eSjoerg }
1217*06f32e7eSjoerg 
isSingleInheritance() const1218*06f32e7eSjoerg bool DIARawSymbol::isSingleInheritance() const {
1219*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isSingleInheritance);
1220*06f32e7eSjoerg }
1221*06f32e7eSjoerg 
isSplitted() const1222*06f32e7eSjoerg bool DIARawSymbol::isSplitted() const {
1223*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isSplitted);
1224*06f32e7eSjoerg }
1225*06f32e7eSjoerg 
isStatic() const1226*06f32e7eSjoerg bool DIARawSymbol::isStatic() const {
1227*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isStatic);
1228*06f32e7eSjoerg }
1229*06f32e7eSjoerg 
hasPrivateSymbols() const1230*06f32e7eSjoerg bool DIARawSymbol::hasPrivateSymbols() const {
1231*06f32e7eSjoerg   // hasPrivateSymbols is the opposite of isStripped, but we expose
1232*06f32e7eSjoerg   // hasPrivateSymbols as a more intuitive interface.
1233*06f32e7eSjoerg   return !PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isStripped);
1234*06f32e7eSjoerg }
1235*06f32e7eSjoerg 
isUnalignedType() const1236*06f32e7eSjoerg bool DIARawSymbol::isUnalignedType() const {
1237*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_unalignedType);
1238*06f32e7eSjoerg }
1239*06f32e7eSjoerg 
isUnreached() const1240*06f32e7eSjoerg bool DIARawSymbol::isUnreached() const {
1241*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_notReached);
1242*06f32e7eSjoerg }
1243*06f32e7eSjoerg 
isValueUdt() const1244*06f32e7eSjoerg bool DIARawSymbol::isValueUdt() const {
1245*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isValueUdt);
1246*06f32e7eSjoerg }
1247*06f32e7eSjoerg 
isVirtual() const1248*06f32e7eSjoerg bool DIARawSymbol::isVirtual() const {
1249*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtual);
1250*06f32e7eSjoerg }
1251*06f32e7eSjoerg 
isVirtualBaseClass() const1252*06f32e7eSjoerg bool DIARawSymbol::isVirtualBaseClass() const {
1253*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtualBaseClass);
1254*06f32e7eSjoerg }
1255*06f32e7eSjoerg 
isVirtualInheritance() const1256*06f32e7eSjoerg bool DIARawSymbol::isVirtualInheritance() const {
1257*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isVirtualInheritance);
1258*06f32e7eSjoerg }
1259*06f32e7eSjoerg 
isVolatileType() const1260*06f32e7eSjoerg bool DIARawSymbol::isVolatileType() const {
1261*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_volatileType);
1262*06f32e7eSjoerg }
1263*06f32e7eSjoerg 
wasInlined() const1264*06f32e7eSjoerg bool DIARawSymbol::wasInlined() const {
1265*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_wasInlined);
1266*06f32e7eSjoerg }
1267*06f32e7eSjoerg 
getUnused() const1268*06f32e7eSjoerg std::string DIARawSymbol::getUnused() const {
1269*06f32e7eSjoerg   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_unused);
1270*06f32e7eSjoerg }
1271