1 //===- llvm/unittest/DebugInfo/PDB/PDBApiTest.cpp -------------------------===//
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
10 #include <unordered_map>
11
12 #include "llvm/ADT/STLExtras.h"
13 #include "llvm/DebugInfo/PDB/IPDBEnumChildren.h"
14 #include "llvm/DebugInfo/PDB/IPDBRawSymbol.h"
15 #include "llvm/DebugInfo/PDB/IPDBSession.h"
16 #include "llvm/DebugInfo/PDB/IPDBSourceFile.h"
17
18 #include "llvm/DebugInfo/PDB/PDBSymbol.h"
19 #include "llvm/DebugInfo/PDB/PDBSymbolAnnotation.h"
20 #include "llvm/DebugInfo/PDB/PDBSymbolBlock.h"
21 #include "llvm/DebugInfo/PDB/PDBSymbolCompiland.h"
22 #include "llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h"
23 #include "llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h"
24 #include "llvm/DebugInfo/PDB/PDBSymbolCustom.h"
25 #include "llvm/DebugInfo/PDB/PDBSymbolData.h"
26 #include "llvm/DebugInfo/PDB/PDBSymbolExe.h"
27 #include "llvm/DebugInfo/PDB/PDBSymbolFunc.h"
28 #include "llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h"
29 #include "llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h"
30 #include "llvm/DebugInfo/PDB/PDBSymbolLabel.h"
31 #include "llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h"
32 #include "llvm/DebugInfo/PDB/PDBSymbolThunk.h"
33 #include "llvm/DebugInfo/PDB/PDBSymbolTypeArray.h"
34 #include "llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h"
35 #include "llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h"
36 #include "llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h"
37 #include "llvm/DebugInfo/PDB/PDBSymbolTypeDimension.h"
38 #include "llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h"
39 #include "llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h"
40 #include "llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h"
41 #include "llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h"
42 #include "llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h"
43 #include "llvm/DebugInfo/PDB/PDBSymbolTypePointer.h"
44 #include "llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h"
45 #include "llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h"
46 #include "llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h"
47 #include "llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h"
48 #include "llvm/DebugInfo/PDB/PDBSymbolUnknown.h"
49 #include "llvm/DebugInfo/PDB/PDBSymbolUsingNamespace.h"
50 #include "llvm/DebugInfo/PDB/PDBTypes.h"
51 #include "gtest/gtest.h"
52 using namespace llvm;
53
54 namespace {
55
56 #define MOCK_SYMBOL_ACCESSOR(Func) \
57 decltype(std::declval<IPDBRawSymbol>().Func()) Func() const override { \
58 typedef decltype(IPDBRawSymbol::Func()) ReturnType; \
59 return ReturnType(); \
60 }
61
62 class MockSession : public IPDBSession {
getLoadAddress() const63 uint64_t getLoadAddress() const override { return 0; }
setLoadAddress(uint64_t Address)64 void setLoadAddress(uint64_t Address) override {}
getGlobalScope() const65 std::unique_ptr<PDBSymbolExe> getGlobalScope() const override {
66 return nullptr;
67 }
getSymbolById(uint32_t SymbolId) const68 std::unique_ptr<PDBSymbol> getSymbolById(uint32_t SymbolId) const override {
69 return nullptr;
70 }
71 std::unique_ptr<IPDBSourceFile>
getSourceFileById(uint32_t SymbolId) const72 getSourceFileById(uint32_t SymbolId) const override {
73 return nullptr;
74 }
getAllSourceFiles() const75 std::unique_ptr<IPDBEnumSourceFiles> getAllSourceFiles() const override {
76 return nullptr;
77 }
getSourceFilesForCompiland(const PDBSymbolCompiland & Compiland) const78 std::unique_ptr<IPDBEnumSourceFiles> getSourceFilesForCompiland(
79 const PDBSymbolCompiland &Compiland) const override {
80 return nullptr;
81 }
82
getDebugStreams() const83 std::unique_ptr<IPDBEnumDataStreams> getDebugStreams() const override {
84 return nullptr;
85 }
86 };
87
88 class MockRawSymbol : public IPDBRawSymbol {
89 public:
MockRawSymbol(PDB_SymType SymType)90 MockRawSymbol(PDB_SymType SymType)
91 : Type(SymType) {}
92
dump(raw_ostream & OS,int Indent) const93 void dump(raw_ostream &OS, int Indent) const override {}
94
95 std::unique_ptr<IPDBEnumSymbols>
findChildren(PDB_SymType Type) const96 findChildren(PDB_SymType Type) const override {
97 return nullptr;
98 }
99 std::unique_ptr<IPDBEnumSymbols>
findChildren(PDB_SymType Type,StringRef Name,PDB_NameSearchFlags Flags) const100 findChildren(PDB_SymType Type, StringRef Name,
101 PDB_NameSearchFlags Flags) const override {
102 return nullptr;
103 }
104 std::unique_ptr<IPDBEnumSymbols>
findChildrenByRVA(PDB_SymType Type,StringRef Name,PDB_NameSearchFlags Flags,uint32_t RVA) const105 findChildrenByRVA(PDB_SymType Type, StringRef Name, PDB_NameSearchFlags Flags,
106 uint32_t RVA) const override {
107 return nullptr;
108 }
109 std::unique_ptr<IPDBEnumSymbols>
findInlineFramesByRVA(uint32_t RVA) const110 findInlineFramesByRVA(uint32_t RVA) const override {
111 return nullptr;
112 }
113
getDataBytes(llvm::SmallVector<uint8_t,32> & bytes) const114 void getDataBytes(llvm::SmallVector<uint8_t, 32> &bytes) const override {}
getFrontEndVersion(VersionInfo & Version) const115 void getFrontEndVersion(VersionInfo &Version) const override {}
getBackEndVersion(VersionInfo & Version) const116 void getBackEndVersion(VersionInfo &Version) const override {}
117
getSymTag() const118 PDB_SymType getSymTag() const override { return Type; }
119
120 MOCK_SYMBOL_ACCESSOR(getAccess)
121 MOCK_SYMBOL_ACCESSOR(getAddressOffset)
122 MOCK_SYMBOL_ACCESSOR(getAddressSection)
123 MOCK_SYMBOL_ACCESSOR(getAge)
124 MOCK_SYMBOL_ACCESSOR(getArrayIndexTypeId)
125 MOCK_SYMBOL_ACCESSOR(getBaseDataOffset)
126 MOCK_SYMBOL_ACCESSOR(getBaseDataSlot)
127 MOCK_SYMBOL_ACCESSOR(getBaseSymbolId)
128 MOCK_SYMBOL_ACCESSOR(getBuiltinType)
129 MOCK_SYMBOL_ACCESSOR(getBitPosition)
130 MOCK_SYMBOL_ACCESSOR(getCallingConvention)
131 MOCK_SYMBOL_ACCESSOR(getClassParentId)
132 MOCK_SYMBOL_ACCESSOR(getCompilerName)
133 MOCK_SYMBOL_ACCESSOR(getCount)
134 MOCK_SYMBOL_ACCESSOR(getCountLiveRanges)
135 MOCK_SYMBOL_ACCESSOR(getLanguage)
136 MOCK_SYMBOL_ACCESSOR(getLexicalParentId)
137 MOCK_SYMBOL_ACCESSOR(getLibraryName)
138 MOCK_SYMBOL_ACCESSOR(getLiveRangeStartAddressOffset)
139 MOCK_SYMBOL_ACCESSOR(getLiveRangeStartAddressSection)
140 MOCK_SYMBOL_ACCESSOR(getLiveRangeStartRelativeVirtualAddress)
141 MOCK_SYMBOL_ACCESSOR(getLocalBasePointerRegisterId)
142 MOCK_SYMBOL_ACCESSOR(getLowerBoundId)
143 MOCK_SYMBOL_ACCESSOR(getMemorySpaceKind)
144 MOCK_SYMBOL_ACCESSOR(getName)
145 MOCK_SYMBOL_ACCESSOR(getNumberOfAcceleratorPointerTags)
146 MOCK_SYMBOL_ACCESSOR(getNumberOfColumns)
147 MOCK_SYMBOL_ACCESSOR(getNumberOfModifiers)
148 MOCK_SYMBOL_ACCESSOR(getNumberOfRegisterIndices)
149 MOCK_SYMBOL_ACCESSOR(getNumberOfRows)
150 MOCK_SYMBOL_ACCESSOR(getObjectFileName)
151 MOCK_SYMBOL_ACCESSOR(getOemId)
152 MOCK_SYMBOL_ACCESSOR(getOemSymbolId)
153 MOCK_SYMBOL_ACCESSOR(getOffsetInUdt)
154 MOCK_SYMBOL_ACCESSOR(getPlatform)
155 MOCK_SYMBOL_ACCESSOR(getRank)
156 MOCK_SYMBOL_ACCESSOR(getRegisterId)
157 MOCK_SYMBOL_ACCESSOR(getRegisterType)
158 MOCK_SYMBOL_ACCESSOR(getRelativeVirtualAddress)
159 MOCK_SYMBOL_ACCESSOR(getSamplerSlot)
160 MOCK_SYMBOL_ACCESSOR(getSignature)
161 MOCK_SYMBOL_ACCESSOR(getSizeInUdt)
162 MOCK_SYMBOL_ACCESSOR(getSlot)
163 MOCK_SYMBOL_ACCESSOR(getSourceFileName)
164 MOCK_SYMBOL_ACCESSOR(getStride)
165 MOCK_SYMBOL_ACCESSOR(getSubTypeId)
166 MOCK_SYMBOL_ACCESSOR(getSymbolsFileName)
167 MOCK_SYMBOL_ACCESSOR(getSymIndexId)
168 MOCK_SYMBOL_ACCESSOR(getTargetOffset)
169 MOCK_SYMBOL_ACCESSOR(getTargetRelativeVirtualAddress)
170 MOCK_SYMBOL_ACCESSOR(getTargetVirtualAddress)
171 MOCK_SYMBOL_ACCESSOR(getTargetSection)
172 MOCK_SYMBOL_ACCESSOR(getTextureSlot)
173 MOCK_SYMBOL_ACCESSOR(getTimeStamp)
174 MOCK_SYMBOL_ACCESSOR(getToken)
175 MOCK_SYMBOL_ACCESSOR(getTypeId)
176 MOCK_SYMBOL_ACCESSOR(getUavSlot)
177 MOCK_SYMBOL_ACCESSOR(getUndecoratedName)
178 MOCK_SYMBOL_ACCESSOR(getUnmodifiedTypeId)
179 MOCK_SYMBOL_ACCESSOR(getUpperBoundId)
180 MOCK_SYMBOL_ACCESSOR(getVirtualBaseDispIndex)
181 MOCK_SYMBOL_ACCESSOR(getVirtualBaseOffset)
182 MOCK_SYMBOL_ACCESSOR(getVirtualTableShapeId)
183 MOCK_SYMBOL_ACCESSOR(getDataKind)
184 MOCK_SYMBOL_ACCESSOR(getGuid)
185 MOCK_SYMBOL_ACCESSOR(getOffset)
186 MOCK_SYMBOL_ACCESSOR(getThisAdjust)
187 MOCK_SYMBOL_ACCESSOR(getVirtualBasePointerOffset)
188 MOCK_SYMBOL_ACCESSOR(getLocationType)
189 MOCK_SYMBOL_ACCESSOR(getMachineType)
190 MOCK_SYMBOL_ACCESSOR(getThunkOrdinal)
191 MOCK_SYMBOL_ACCESSOR(getLength)
192 MOCK_SYMBOL_ACCESSOR(getLiveRangeLength)
193 MOCK_SYMBOL_ACCESSOR(getVirtualAddress)
194 MOCK_SYMBOL_ACCESSOR(getUdtKind)
195 MOCK_SYMBOL_ACCESSOR(hasConstructor)
196 MOCK_SYMBOL_ACCESSOR(hasCustomCallingConvention)
197 MOCK_SYMBOL_ACCESSOR(hasFarReturn)
198 MOCK_SYMBOL_ACCESSOR(isCode)
199 MOCK_SYMBOL_ACCESSOR(isCompilerGenerated)
200 MOCK_SYMBOL_ACCESSOR(isConstType)
201 MOCK_SYMBOL_ACCESSOR(isEditAndContinueEnabled)
202 MOCK_SYMBOL_ACCESSOR(isFunction)
203 MOCK_SYMBOL_ACCESSOR(getAddressTaken)
204 MOCK_SYMBOL_ACCESSOR(getNoStackOrdering)
205 MOCK_SYMBOL_ACCESSOR(hasAlloca)
206 MOCK_SYMBOL_ACCESSOR(hasAssignmentOperator)
207 MOCK_SYMBOL_ACCESSOR(hasCTypes)
208 MOCK_SYMBOL_ACCESSOR(hasCastOperator)
209 MOCK_SYMBOL_ACCESSOR(hasDebugInfo)
210 MOCK_SYMBOL_ACCESSOR(hasEH)
211 MOCK_SYMBOL_ACCESSOR(hasEHa)
212 MOCK_SYMBOL_ACCESSOR(hasFramePointer)
213 MOCK_SYMBOL_ACCESSOR(hasInlAsm)
214 MOCK_SYMBOL_ACCESSOR(hasInlineAttribute)
215 MOCK_SYMBOL_ACCESSOR(hasInterruptReturn)
216 MOCK_SYMBOL_ACCESSOR(hasLongJump)
217 MOCK_SYMBOL_ACCESSOR(hasManagedCode)
218 MOCK_SYMBOL_ACCESSOR(hasNestedTypes)
219 MOCK_SYMBOL_ACCESSOR(hasNoInlineAttribute)
220 MOCK_SYMBOL_ACCESSOR(hasNoReturnAttribute)
221 MOCK_SYMBOL_ACCESSOR(hasOptimizedCodeDebugInfo)
222 MOCK_SYMBOL_ACCESSOR(hasOverloadedOperator)
223 MOCK_SYMBOL_ACCESSOR(hasSEH)
224 MOCK_SYMBOL_ACCESSOR(hasSecurityChecks)
225 MOCK_SYMBOL_ACCESSOR(hasSetJump)
226 MOCK_SYMBOL_ACCESSOR(hasStrictGSCheck)
227 MOCK_SYMBOL_ACCESSOR(isAcceleratorGroupSharedLocal)
228 MOCK_SYMBOL_ACCESSOR(isAcceleratorPointerTagLiveRange)
229 MOCK_SYMBOL_ACCESSOR(isAcceleratorStubFunction)
230 MOCK_SYMBOL_ACCESSOR(isAggregated)
231 MOCK_SYMBOL_ACCESSOR(isIntroVirtualFunction)
232 MOCK_SYMBOL_ACCESSOR(isCVTCIL)
233 MOCK_SYMBOL_ACCESSOR(isConstructorVirtualBase)
234 MOCK_SYMBOL_ACCESSOR(isCxxReturnUdt)
235 MOCK_SYMBOL_ACCESSOR(isDataAligned)
236 MOCK_SYMBOL_ACCESSOR(isHLSLData)
237 MOCK_SYMBOL_ACCESSOR(isHotpatchable)
238 MOCK_SYMBOL_ACCESSOR(isIndirectVirtualBaseClass)
239 MOCK_SYMBOL_ACCESSOR(isInterfaceUdt)
240 MOCK_SYMBOL_ACCESSOR(isIntrinsic)
241 MOCK_SYMBOL_ACCESSOR(isLTCG)
242 MOCK_SYMBOL_ACCESSOR(isLocationControlFlowDependent)
243 MOCK_SYMBOL_ACCESSOR(isMSILNetmodule)
244 MOCK_SYMBOL_ACCESSOR(isMatrixRowMajor)
245 MOCK_SYMBOL_ACCESSOR(isManagedCode)
246 MOCK_SYMBOL_ACCESSOR(isMSILCode)
247 MOCK_SYMBOL_ACCESSOR(isMultipleInheritance)
248 MOCK_SYMBOL_ACCESSOR(isNaked)
249 MOCK_SYMBOL_ACCESSOR(isNested)
250 MOCK_SYMBOL_ACCESSOR(isOptimizedAway)
251 MOCK_SYMBOL_ACCESSOR(isPacked)
252 MOCK_SYMBOL_ACCESSOR(isPointerBasedOnSymbolValue)
253 MOCK_SYMBOL_ACCESSOR(isPointerToDataMember)
254 MOCK_SYMBOL_ACCESSOR(isPointerToMemberFunction)
255 MOCK_SYMBOL_ACCESSOR(isPureVirtual)
256 MOCK_SYMBOL_ACCESSOR(isRValueReference)
257 MOCK_SYMBOL_ACCESSOR(isRefUdt)
258 MOCK_SYMBOL_ACCESSOR(isReference)
259 MOCK_SYMBOL_ACCESSOR(isRestrictedType)
260 MOCK_SYMBOL_ACCESSOR(isReturnValue)
261 MOCK_SYMBOL_ACCESSOR(isSafeBuffers)
262 MOCK_SYMBOL_ACCESSOR(isScoped)
263 MOCK_SYMBOL_ACCESSOR(isSdl)
264 MOCK_SYMBOL_ACCESSOR(isSingleInheritance)
265 MOCK_SYMBOL_ACCESSOR(isSplitted)
266 MOCK_SYMBOL_ACCESSOR(isStatic)
267 MOCK_SYMBOL_ACCESSOR(hasPrivateSymbols)
268 MOCK_SYMBOL_ACCESSOR(isUnalignedType)
269 MOCK_SYMBOL_ACCESSOR(isUnreached)
270 MOCK_SYMBOL_ACCESSOR(isValueUdt)
271 MOCK_SYMBOL_ACCESSOR(isVirtual)
272 MOCK_SYMBOL_ACCESSOR(isVirtualBaseClass)
273 MOCK_SYMBOL_ACCESSOR(isVirtualInheritance)
274 MOCK_SYMBOL_ACCESSOR(isVolatileType)
275 MOCK_SYMBOL_ACCESSOR(getValue)
276 MOCK_SYMBOL_ACCESSOR(wasInlined)
277 MOCK_SYMBOL_ACCESSOR(getUnused)
278
279 private:
280 PDB_SymType Type;
281 };
282
283 class PDBApiTest : public testing::Test {
284 public:
285 std::unordered_map<PDB_SymType, std::unique_ptr<PDBSymbol>> SymbolMap;
286
SetUp()287 void SetUp() override {
288 Session.reset(new MockSession());
289
290 InsertItemWithTag(PDB_SymType::None);
291 InsertItemWithTag(PDB_SymType::Exe);
292 InsertItemWithTag(PDB_SymType::Compiland);
293 InsertItemWithTag(PDB_SymType::CompilandDetails);
294 InsertItemWithTag(PDB_SymType::CompilandEnv);
295 InsertItemWithTag(PDB_SymType::Function);
296 InsertItemWithTag(PDB_SymType::Block);
297 InsertItemWithTag(PDB_SymType::Data);
298 InsertItemWithTag(PDB_SymType::Annotation);
299 InsertItemWithTag(PDB_SymType::Label);
300 InsertItemWithTag(PDB_SymType::PublicSymbol);
301 InsertItemWithTag(PDB_SymType::UDT);
302 InsertItemWithTag(PDB_SymType::Enum);
303 InsertItemWithTag(PDB_SymType::FunctionSig);
304 InsertItemWithTag(PDB_SymType::PointerType);
305 InsertItemWithTag(PDB_SymType::ArrayType);
306 InsertItemWithTag(PDB_SymType::BuiltinType);
307 InsertItemWithTag(PDB_SymType::Typedef);
308 InsertItemWithTag(PDB_SymType::BaseClass);
309 InsertItemWithTag(PDB_SymType::Friend);
310 InsertItemWithTag(PDB_SymType::FunctionArg);
311 InsertItemWithTag(PDB_SymType::FuncDebugStart);
312 InsertItemWithTag(PDB_SymType::FuncDebugEnd);
313 InsertItemWithTag(PDB_SymType::UsingNamespace);
314 InsertItemWithTag(PDB_SymType::VTableShape);
315 InsertItemWithTag(PDB_SymType::VTable);
316 InsertItemWithTag(PDB_SymType::Custom);
317 InsertItemWithTag(PDB_SymType::Thunk);
318 InsertItemWithTag(PDB_SymType::CustomType);
319 InsertItemWithTag(PDB_SymType::ManagedType);
320 InsertItemWithTag(PDB_SymType::Dimension);
321 InsertItemWithTag(PDB_SymType::Max);
322 }
323
VerifyDyncast(PDB_SymType Tag)324 template <class ExpectedType> void VerifyDyncast(PDB_SymType Tag) {
325 for (auto item = SymbolMap.begin(); item != SymbolMap.end(); ++item) {
326 EXPECT_EQ(item->first == Tag, llvm::isa<ExpectedType>(*item->second));
327 }
328 }
329
VerifyUnknownDyncasts()330 void VerifyUnknownDyncasts() {
331 for (auto item = SymbolMap.begin(); item != SymbolMap.end(); ++item) {
332 bool should_match = false;
333 if (item->first == PDB_SymType::None || item->first >= PDB_SymType::Max)
334 should_match = true;
335
336 EXPECT_EQ(should_match, llvm::isa<PDBSymbolUnknown>(*item->second));
337 }
338 }
339
340 private:
341 std::unique_ptr<IPDBSession> Session;
342
InsertItemWithTag(PDB_SymType Tag)343 void InsertItemWithTag(PDB_SymType Tag) {
344 auto RawSymbol = llvm::make_unique<MockRawSymbol>(Tag);
345 auto Symbol = PDBSymbol::create(*Session, std::move(RawSymbol));
346 SymbolMap.insert(std::make_pair(Tag, std::move(Symbol)));
347 }
348 };
349
TEST_F(PDBApiTest,Dyncast)350 TEST_F(PDBApiTest, Dyncast) {
351
352 // Most of the types have a one-to-one mapping between Tag and concrete type.
353 VerifyDyncast<PDBSymbolExe>(PDB_SymType::Exe);
354 VerifyDyncast<PDBSymbolCompiland>(PDB_SymType::Compiland);
355 VerifyDyncast<PDBSymbolCompilandDetails>(PDB_SymType::CompilandDetails);
356 VerifyDyncast<PDBSymbolCompilandEnv>(PDB_SymType::CompilandEnv);
357 VerifyDyncast<PDBSymbolFunc>(PDB_SymType::Function);
358 VerifyDyncast<PDBSymbolBlock>(PDB_SymType::Block);
359 VerifyDyncast<PDBSymbolData>(PDB_SymType::Data);
360 VerifyDyncast<PDBSymbolAnnotation>(PDB_SymType::Annotation);
361 VerifyDyncast<PDBSymbolLabel>(PDB_SymType::Label);
362 VerifyDyncast<PDBSymbolPublicSymbol>(PDB_SymType::PublicSymbol);
363 VerifyDyncast<PDBSymbolTypeUDT>(PDB_SymType::UDT);
364 VerifyDyncast<PDBSymbolTypeEnum>(PDB_SymType::Enum);
365 VerifyDyncast<PDBSymbolTypeFunctionSig>(PDB_SymType::FunctionSig);
366 VerifyDyncast<PDBSymbolTypePointer>(PDB_SymType::PointerType);
367 VerifyDyncast<PDBSymbolTypeArray>(PDB_SymType::ArrayType);
368 VerifyDyncast<PDBSymbolTypeBuiltin>(PDB_SymType::BuiltinType);
369 VerifyDyncast<PDBSymbolTypeTypedef>(PDB_SymType::Typedef);
370 VerifyDyncast<PDBSymbolTypeBaseClass>(PDB_SymType::BaseClass);
371 VerifyDyncast<PDBSymbolTypeFriend>(PDB_SymType::Friend);
372 VerifyDyncast<PDBSymbolTypeFunctionArg>(PDB_SymType::FunctionArg);
373 VerifyDyncast<PDBSymbolFuncDebugStart>(PDB_SymType::FuncDebugStart);
374 VerifyDyncast<PDBSymbolFuncDebugEnd>(PDB_SymType::FuncDebugEnd);
375 VerifyDyncast<PDBSymbolUsingNamespace>(PDB_SymType::UsingNamespace);
376 VerifyDyncast<PDBSymbolTypeVTableShape>(PDB_SymType::VTableShape);
377 VerifyDyncast<PDBSymbolTypeVTable>(PDB_SymType::VTable);
378 VerifyDyncast<PDBSymbolCustom>(PDB_SymType::Custom);
379 VerifyDyncast<PDBSymbolThunk>(PDB_SymType::Thunk);
380 VerifyDyncast<PDBSymbolTypeCustom>(PDB_SymType::CustomType);
381 VerifyDyncast<PDBSymbolTypeManaged>(PDB_SymType::ManagedType);
382 VerifyDyncast<PDBSymbolTypeDimension>(PDB_SymType::Dimension);
383
384 VerifyUnknownDyncasts();
385 }
386
387 } // end anonymous namespace
388