PDBApiTest.cpp 15 KB

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