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 15 #define PDB_SYMDUMP_UNREACHABLE(Type) \ 16 if (RequireImpl) \ 17 llvm_unreachable("Attempt to dump " #Type " with no dump implementation"); 18 PDBSymDumper(bool ShouldRequireImpl)19PDBSymDumper::PDBSymDumper(bool ShouldRequireImpl) 20 : RequireImpl(ShouldRequireImpl) {} 21 ~PDBSymDumper()22PDBSymDumper::~PDBSymDumper() {} 23 dump(const PDBSymbolAnnotation & Symbol)24void PDBSymDumper::dump(const PDBSymbolAnnotation &Symbol) { 25 PDB_SYMDUMP_UNREACHABLE(PDBSymbolAnnotation) 26 } 27 dump(const PDBSymbolBlock & Symbol)28void PDBSymDumper::dump(const PDBSymbolBlock &Symbol) { 29 PDB_SYMDUMP_UNREACHABLE(PDBSymbolBlock) 30 } 31 dump(const PDBSymbolCompiland & Symbol)32void PDBSymDumper::dump(const PDBSymbolCompiland &Symbol) { 33 PDB_SYMDUMP_UNREACHABLE(PDBSymbolCompiland) 34 } 35 dump(const PDBSymbolCompilandDetails & Symbol)36void PDBSymDumper::dump(const PDBSymbolCompilandDetails &Symbol) { 37 PDB_SYMDUMP_UNREACHABLE(PDBSymbolCompilandDetails) 38 } 39 dump(const PDBSymbolCompilandEnv & Symbol)40void PDBSymDumper::dump(const PDBSymbolCompilandEnv &Symbol) { 41 PDB_SYMDUMP_UNREACHABLE(PDBSymbolCompilandEnv) 42 } 43 dump(const PDBSymbolCustom & Symbol)44void PDBSymDumper::dump(const PDBSymbolCustom &Symbol) { 45 PDB_SYMDUMP_UNREACHABLE(PDBSymbolCustom) 46 } 47 dump(const PDBSymbolData & Symbol)48void PDBSymDumper::dump(const PDBSymbolData &Symbol) { 49 PDB_SYMDUMP_UNREACHABLE(PDBSymbolData) 50 } 51 dump(const PDBSymbolExe & Symbol)52void PDBSymDumper::dump(const PDBSymbolExe &Symbol) { 53 PDB_SYMDUMP_UNREACHABLE(PDBSymbolExe) 54 } 55 dump(const PDBSymbolFunc & Symbol)56void PDBSymDumper::dump(const PDBSymbolFunc &Symbol) { 57 PDB_SYMDUMP_UNREACHABLE(PDBSymbolFunc) 58 } 59 dump(const PDBSymbolFuncDebugEnd & Symbol)60void PDBSymDumper::dump(const PDBSymbolFuncDebugEnd &Symbol) { 61 PDB_SYMDUMP_UNREACHABLE(PDBSymbolFuncDebugEnd) 62 } 63 dump(const PDBSymbolFuncDebugStart & Symbol)64void PDBSymDumper::dump(const PDBSymbolFuncDebugStart &Symbol) { 65 PDB_SYMDUMP_UNREACHABLE(PDBSymbolFuncDebugStart) 66 } 67 dump(const PDBSymbolLabel & Symbol)68void PDBSymDumper::dump(const PDBSymbolLabel &Symbol) { 69 PDB_SYMDUMP_UNREACHABLE(PDBSymbolLabel) 70 } 71 dump(const PDBSymbolPublicSymbol & Symbol)72void PDBSymDumper::dump(const PDBSymbolPublicSymbol &Symbol) { 73 PDB_SYMDUMP_UNREACHABLE(PDBSymbolPublicSymbol) 74 } 75 dump(const PDBSymbolThunk & Symbol)76void PDBSymDumper::dump(const PDBSymbolThunk &Symbol) { 77 PDB_SYMDUMP_UNREACHABLE(PDBSymbolThunk) 78 } 79 dump(const PDBSymbolTypeArray & Symbol)80void PDBSymDumper::dump(const PDBSymbolTypeArray &Symbol) { 81 PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeArray) 82 } 83 dump(const PDBSymbolTypeBaseClass & Symbol)84void PDBSymDumper::dump(const PDBSymbolTypeBaseClass &Symbol) { 85 PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeBaseClass) 86 } 87 dump(const PDBSymbolTypeBuiltin & Symbol)88void PDBSymDumper::dump(const PDBSymbolTypeBuiltin &Symbol) { 89 PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeBuiltin) 90 } 91 dump(const PDBSymbolTypeCustom & Symbol)92void PDBSymDumper::dump(const PDBSymbolTypeCustom &Symbol) { 93 PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeCustom) 94 } 95 dump(const PDBSymbolTypeDimension & Symbol)96void PDBSymDumper::dump(const PDBSymbolTypeDimension &Symbol) { 97 PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeDimension) 98 } 99 dump(const PDBSymbolTypeEnum & Symbol)100void PDBSymDumper::dump(const PDBSymbolTypeEnum &Symbol) { 101 PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeEnum) 102 } 103 dump(const PDBSymbolTypeFriend & Symbol)104void PDBSymDumper::dump(const PDBSymbolTypeFriend &Symbol) { 105 PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeFriend) 106 } 107 dump(const PDBSymbolTypeFunctionArg & Symbol)108void PDBSymDumper::dump(const PDBSymbolTypeFunctionArg &Symbol) { 109 PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeFunctionArg) 110 } 111 dump(const PDBSymbolTypeFunctionSig & Symbol)112void PDBSymDumper::dump(const PDBSymbolTypeFunctionSig &Symbol) { 113 PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeFunctionSig) 114 } 115 dump(const PDBSymbolTypeManaged & Symbol)116void PDBSymDumper::dump(const PDBSymbolTypeManaged &Symbol) { 117 PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeManaged) 118 } 119 dump(const PDBSymbolTypePointer & Symbol)120void PDBSymDumper::dump(const PDBSymbolTypePointer &Symbol) { 121 PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypePointer) 122 } 123 dump(const PDBSymbolTypeTypedef & Symbol)124void PDBSymDumper::dump(const PDBSymbolTypeTypedef &Symbol) { 125 PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeTypedef) 126 } 127 dump(const PDBSymbolTypeUDT & Symbol)128void PDBSymDumper::dump(const PDBSymbolTypeUDT &Symbol) { 129 PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeUDT) 130 } 131 dump(const PDBSymbolTypeVTable & Symbol)132void PDBSymDumper::dump(const PDBSymbolTypeVTable &Symbol) { 133 PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeVTable) 134 } 135 dump(const PDBSymbolTypeVTableShape & Symbol)136void PDBSymDumper::dump(const PDBSymbolTypeVTableShape &Symbol) { 137 PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeVTableShape) 138 } 139 dump(const PDBSymbolUnknown & Symbol)140void PDBSymDumper::dump(const PDBSymbolUnknown &Symbol) { 141 PDB_SYMDUMP_UNREACHABLE(PDBSymbolUnknown) 142 } 143 dump(const PDBSymbolUsingNamespace & Symbol)144void PDBSymDumper::dump(const PDBSymbolUsingNamespace &Symbol) { 145 PDB_SYMDUMP_UNREACHABLE(PDBSymbolUsingNamespace) 146 } 147