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