1 //===- PDBSymDumper.cpp - ---------------------------------------*- C++ -*-===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 #include "llvm/DebugInfo/PDB/PDBSymDumper.h" 11 #include "llvm/Support/ErrorHandling.h" 12 13 using namespace llvm; 14 using namespace llvm::pdb; 15 16 #define PDB_SYMDUMP_UNREACHABLE(Type) \ 17 if (RequireImpl) \ 18 llvm_unreachable("Attempt to dump " #Type " with no dump implementation"); 19 PDBSymDumper(bool ShouldRequireImpl)20PDBSymDumper::PDBSymDumper(bool ShouldRequireImpl) 21 : RequireImpl(ShouldRequireImpl) {} 22 23 PDBSymDumper::~PDBSymDumper() = default; 24 dump(const PDBSymbolAnnotation & Symbol)25void PDBSymDumper::dump(const PDBSymbolAnnotation &Symbol) { 26 PDB_SYMDUMP_UNREACHABLE(PDBSymbolAnnotation) 27 } 28 dump(const PDBSymbolBlock & Symbol)29void PDBSymDumper::dump(const PDBSymbolBlock &Symbol) { 30 PDB_SYMDUMP_UNREACHABLE(PDBSymbolBlock) 31 } 32 dump(const PDBSymbolCompiland & Symbol)33void PDBSymDumper::dump(const PDBSymbolCompiland &Symbol) { 34 PDB_SYMDUMP_UNREACHABLE(PDBSymbolCompiland) 35 } 36 dump(const PDBSymbolCompilandDetails & Symbol)37void PDBSymDumper::dump(const PDBSymbolCompilandDetails &Symbol) { 38 PDB_SYMDUMP_UNREACHABLE(PDBSymbolCompilandDetails) 39 } 40 dump(const PDBSymbolCompilandEnv & Symbol)41void PDBSymDumper::dump(const PDBSymbolCompilandEnv &Symbol) { 42 PDB_SYMDUMP_UNREACHABLE(PDBSymbolCompilandEnv) 43 } 44 dump(const PDBSymbolCustom & Symbol)45void PDBSymDumper::dump(const PDBSymbolCustom &Symbol) { 46 PDB_SYMDUMP_UNREACHABLE(PDBSymbolCustom) 47 } 48 dump(const PDBSymbolData & Symbol)49void PDBSymDumper::dump(const PDBSymbolData &Symbol) { 50 PDB_SYMDUMP_UNREACHABLE(PDBSymbolData) 51 } 52 dump(const PDBSymbolExe & Symbol)53void PDBSymDumper::dump(const PDBSymbolExe &Symbol) { 54 PDB_SYMDUMP_UNREACHABLE(PDBSymbolExe) 55 } 56 dump(const PDBSymbolFunc & Symbol)57void PDBSymDumper::dump(const PDBSymbolFunc &Symbol) { 58 PDB_SYMDUMP_UNREACHABLE(PDBSymbolFunc) 59 } 60 dump(const PDBSymbolFuncDebugEnd & Symbol)61void PDBSymDumper::dump(const PDBSymbolFuncDebugEnd &Symbol) { 62 PDB_SYMDUMP_UNREACHABLE(PDBSymbolFuncDebugEnd) 63 } 64 dump(const PDBSymbolFuncDebugStart & Symbol)65void PDBSymDumper::dump(const PDBSymbolFuncDebugStart &Symbol) { 66 PDB_SYMDUMP_UNREACHABLE(PDBSymbolFuncDebugStart) 67 } 68 dump(const PDBSymbolLabel & Symbol)69void PDBSymDumper::dump(const PDBSymbolLabel &Symbol) { 70 PDB_SYMDUMP_UNREACHABLE(PDBSymbolLabel) 71 } 72 dump(const PDBSymbolPublicSymbol & Symbol)73void PDBSymDumper::dump(const PDBSymbolPublicSymbol &Symbol) { 74 PDB_SYMDUMP_UNREACHABLE(PDBSymbolPublicSymbol) 75 } 76 dump(const PDBSymbolThunk & Symbol)77void PDBSymDumper::dump(const PDBSymbolThunk &Symbol) { 78 PDB_SYMDUMP_UNREACHABLE(PDBSymbolThunk) 79 } 80 dump(const PDBSymbolTypeArray & Symbol)81void PDBSymDumper::dump(const PDBSymbolTypeArray &Symbol) { 82 PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeArray) 83 } 84 dump(const PDBSymbolTypeBaseClass & Symbol)85void PDBSymDumper::dump(const PDBSymbolTypeBaseClass &Symbol) { 86 PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeBaseClass) 87 } 88 dump(const PDBSymbolTypeBuiltin & Symbol)89void PDBSymDumper::dump(const PDBSymbolTypeBuiltin &Symbol) { 90 PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeBuiltin) 91 } 92 dump(const PDBSymbolTypeCustom & Symbol)93void PDBSymDumper::dump(const PDBSymbolTypeCustom &Symbol) { 94 PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeCustom) 95 } 96 dump(const PDBSymbolTypeDimension & Symbol)97void PDBSymDumper::dump(const PDBSymbolTypeDimension &Symbol) { 98 PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeDimension) 99 } 100 dump(const PDBSymbolTypeEnum & Symbol)101void PDBSymDumper::dump(const PDBSymbolTypeEnum &Symbol) { 102 PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeEnum) 103 } 104 dump(const PDBSymbolTypeFriend & Symbol)105void PDBSymDumper::dump(const PDBSymbolTypeFriend &Symbol) { 106 PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeFriend) 107 } 108 dump(const PDBSymbolTypeFunctionArg & Symbol)109void PDBSymDumper::dump(const PDBSymbolTypeFunctionArg &Symbol) { 110 PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeFunctionArg) 111 } 112 dump(const PDBSymbolTypeFunctionSig & Symbol)113void PDBSymDumper::dump(const PDBSymbolTypeFunctionSig &Symbol) { 114 PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeFunctionSig) 115 } 116 dump(const PDBSymbolTypeManaged & Symbol)117void PDBSymDumper::dump(const PDBSymbolTypeManaged &Symbol) { 118 PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeManaged) 119 } 120 dump(const PDBSymbolTypePointer & Symbol)121void PDBSymDumper::dump(const PDBSymbolTypePointer &Symbol) { 122 PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypePointer) 123 } 124 dump(const PDBSymbolTypeTypedef & Symbol)125void PDBSymDumper::dump(const PDBSymbolTypeTypedef &Symbol) { 126 PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeTypedef) 127 } 128 dump(const PDBSymbolTypeUDT & Symbol)129void PDBSymDumper::dump(const PDBSymbolTypeUDT &Symbol) { 130 PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeUDT) 131 } 132 dump(const PDBSymbolTypeVTable & Symbol)133void PDBSymDumper::dump(const PDBSymbolTypeVTable &Symbol) { 134 PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeVTable) 135 } 136 dump(const PDBSymbolTypeVTableShape & Symbol)137void PDBSymDumper::dump(const PDBSymbolTypeVTableShape &Symbol) { 138 PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeVTableShape) 139 } 140 dump(const PDBSymbolUnknown & Symbol)141void PDBSymDumper::dump(const PDBSymbolUnknown &Symbol) { 142 PDB_SYMDUMP_UNREACHABLE(PDBSymbolUnknown) 143 } 144 dump(const PDBSymbolUsingNamespace & Symbol)145void PDBSymDumper::dump(const PDBSymbolUsingNamespace &Symbol) { 146 PDB_SYMDUMP_UNREACHABLE(PDBSymbolUsingNamespace) 147 } 148