2015-02-23 06:03:38 +08:00
|
|
|
//===- PDBSymDumper.cpp - ---------------------------------------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "llvm/DebugInfo/PDB/PDBSymDumper.h"
|
|
|
|
#include "llvm/Support/ErrorHandling.h"
|
|
|
|
|
|
|
|
using namespace llvm;
|
2016-05-05 04:32:13 +08:00
|
|
|
using namespace llvm::pdb;
|
2015-02-23 06:03:38 +08:00
|
|
|
|
|
|
|
#define PDB_SYMDUMP_UNREACHABLE(Type) \
|
|
|
|
if (RequireImpl) \
|
|
|
|
llvm_unreachable("Attempt to dump " #Type " with no dump implementation");
|
|
|
|
|
|
|
|
PDBSymDumper::PDBSymDumper(bool ShouldRequireImpl)
|
|
|
|
: RequireImpl(ShouldRequireImpl) {}
|
|
|
|
|
2016-11-24 07:16:32 +08:00
|
|
|
PDBSymDumper::~PDBSymDumper() = default;
|
2015-02-23 06:03:38 +08:00
|
|
|
|
2015-03-01 14:51:29 +08:00
|
|
|
void PDBSymDumper::dump(const PDBSymbolAnnotation &Symbol) {
|
2015-02-23 06:03:38 +08:00
|
|
|
PDB_SYMDUMP_UNREACHABLE(PDBSymbolAnnotation)
|
|
|
|
}
|
|
|
|
|
2015-03-01 14:51:29 +08:00
|
|
|
void PDBSymDumper::dump(const PDBSymbolBlock &Symbol) {
|
2015-02-23 06:03:38 +08:00
|
|
|
PDB_SYMDUMP_UNREACHABLE(PDBSymbolBlock)
|
|
|
|
}
|
|
|
|
|
2015-03-01 14:51:29 +08:00
|
|
|
void PDBSymDumper::dump(const PDBSymbolCompiland &Symbol) {
|
2015-02-23 06:03:38 +08:00
|
|
|
PDB_SYMDUMP_UNREACHABLE(PDBSymbolCompiland)
|
|
|
|
}
|
|
|
|
|
2015-03-01 14:51:29 +08:00
|
|
|
void PDBSymDumper::dump(const PDBSymbolCompilandDetails &Symbol) {
|
2015-02-23 06:03:38 +08:00
|
|
|
PDB_SYMDUMP_UNREACHABLE(PDBSymbolCompilandDetails)
|
|
|
|
}
|
|
|
|
|
2015-03-01 14:51:29 +08:00
|
|
|
void PDBSymDumper::dump(const PDBSymbolCompilandEnv &Symbol) {
|
2015-02-23 06:03:38 +08:00
|
|
|
PDB_SYMDUMP_UNREACHABLE(PDBSymbolCompilandEnv)
|
|
|
|
}
|
|
|
|
|
2015-03-01 14:51:29 +08:00
|
|
|
void PDBSymDumper::dump(const PDBSymbolCustom &Symbol) {
|
2015-02-23 06:03:38 +08:00
|
|
|
PDB_SYMDUMP_UNREACHABLE(PDBSymbolCustom)
|
|
|
|
}
|
|
|
|
|
2015-03-01 14:51:29 +08:00
|
|
|
void PDBSymDumper::dump(const PDBSymbolData &Symbol) {
|
2015-02-23 06:03:38 +08:00
|
|
|
PDB_SYMDUMP_UNREACHABLE(PDBSymbolData)
|
|
|
|
}
|
|
|
|
|
2015-03-01 14:51:29 +08:00
|
|
|
void PDBSymDumper::dump(const PDBSymbolExe &Symbol) {
|
2015-02-23 06:03:38 +08:00
|
|
|
PDB_SYMDUMP_UNREACHABLE(PDBSymbolExe)
|
|
|
|
}
|
|
|
|
|
2015-03-01 14:51:29 +08:00
|
|
|
void PDBSymDumper::dump(const PDBSymbolFunc &Symbol) {
|
2015-02-23 06:03:38 +08:00
|
|
|
PDB_SYMDUMP_UNREACHABLE(PDBSymbolFunc)
|
|
|
|
}
|
|
|
|
|
2015-03-01 14:51:29 +08:00
|
|
|
void PDBSymDumper::dump(const PDBSymbolFuncDebugEnd &Symbol) {
|
2015-02-23 06:03:38 +08:00
|
|
|
PDB_SYMDUMP_UNREACHABLE(PDBSymbolFuncDebugEnd)
|
|
|
|
}
|
|
|
|
|
2015-03-01 14:51:29 +08:00
|
|
|
void PDBSymDumper::dump(const PDBSymbolFuncDebugStart &Symbol) {
|
2015-02-23 06:03:38 +08:00
|
|
|
PDB_SYMDUMP_UNREACHABLE(PDBSymbolFuncDebugStart)
|
|
|
|
}
|
|
|
|
|
2015-03-01 14:51:29 +08:00
|
|
|
void PDBSymDumper::dump(const PDBSymbolLabel &Symbol) {
|
2015-02-23 06:03:38 +08:00
|
|
|
PDB_SYMDUMP_UNREACHABLE(PDBSymbolLabel)
|
|
|
|
}
|
|
|
|
|
2015-03-01 14:51:29 +08:00
|
|
|
void PDBSymDumper::dump(const PDBSymbolPublicSymbol &Symbol) {
|
2015-02-23 06:03:38 +08:00
|
|
|
PDB_SYMDUMP_UNREACHABLE(PDBSymbolPublicSymbol)
|
|
|
|
}
|
|
|
|
|
2015-03-01 14:51:29 +08:00
|
|
|
void PDBSymDumper::dump(const PDBSymbolThunk &Symbol) {
|
2015-02-23 06:03:38 +08:00
|
|
|
PDB_SYMDUMP_UNREACHABLE(PDBSymbolThunk)
|
|
|
|
}
|
|
|
|
|
2015-03-01 14:51:29 +08:00
|
|
|
void PDBSymDumper::dump(const PDBSymbolTypeArray &Symbol) {
|
2015-02-23 06:03:38 +08:00
|
|
|
PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeArray)
|
|
|
|
}
|
|
|
|
|
2015-03-01 14:51:29 +08:00
|
|
|
void PDBSymDumper::dump(const PDBSymbolTypeBaseClass &Symbol) {
|
2015-02-23 06:03:38 +08:00
|
|
|
PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeBaseClass)
|
|
|
|
}
|
|
|
|
|
2015-03-01 14:51:29 +08:00
|
|
|
void PDBSymDumper::dump(const PDBSymbolTypeBuiltin &Symbol) {
|
2015-02-23 06:03:38 +08:00
|
|
|
PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeBuiltin)
|
|
|
|
}
|
|
|
|
|
2015-03-01 14:51:29 +08:00
|
|
|
void PDBSymDumper::dump(const PDBSymbolTypeCustom &Symbol) {
|
2015-02-23 06:03:38 +08:00
|
|
|
PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeCustom)
|
|
|
|
}
|
|
|
|
|
2015-03-01 14:51:29 +08:00
|
|
|
void PDBSymDumper::dump(const PDBSymbolTypeDimension &Symbol) {
|
2015-02-23 06:03:38 +08:00
|
|
|
PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeDimension)
|
|
|
|
}
|
|
|
|
|
2015-03-01 14:51:29 +08:00
|
|
|
void PDBSymDumper::dump(const PDBSymbolTypeEnum &Symbol) {
|
2015-02-23 06:03:38 +08:00
|
|
|
PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeEnum)
|
|
|
|
}
|
|
|
|
|
2015-03-01 14:51:29 +08:00
|
|
|
void PDBSymDumper::dump(const PDBSymbolTypeFriend &Symbol) {
|
2015-02-23 06:03:38 +08:00
|
|
|
PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeFriend)
|
|
|
|
}
|
|
|
|
|
2015-03-01 14:51:29 +08:00
|
|
|
void PDBSymDumper::dump(const PDBSymbolTypeFunctionArg &Symbol) {
|
2015-02-23 06:03:38 +08:00
|
|
|
PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeFunctionArg)
|
|
|
|
}
|
|
|
|
|
2015-03-01 14:51:29 +08:00
|
|
|
void PDBSymDumper::dump(const PDBSymbolTypeFunctionSig &Symbol) {
|
2015-02-23 06:03:38 +08:00
|
|
|
PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeFunctionSig)
|
|
|
|
}
|
|
|
|
|
2015-03-01 14:51:29 +08:00
|
|
|
void PDBSymDumper::dump(const PDBSymbolTypeManaged &Symbol) {
|
2015-02-23 06:03:38 +08:00
|
|
|
PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeManaged)
|
|
|
|
}
|
|
|
|
|
2015-03-01 14:51:29 +08:00
|
|
|
void PDBSymDumper::dump(const PDBSymbolTypePointer &Symbol) {
|
2015-02-23 06:03:38 +08:00
|
|
|
PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypePointer)
|
|
|
|
}
|
|
|
|
|
2015-03-01 14:51:29 +08:00
|
|
|
void PDBSymDumper::dump(const PDBSymbolTypeTypedef &Symbol) {
|
2015-02-23 06:03:38 +08:00
|
|
|
PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeTypedef)
|
|
|
|
}
|
|
|
|
|
2015-03-01 14:51:29 +08:00
|
|
|
void PDBSymDumper::dump(const PDBSymbolTypeUDT &Symbol) {
|
2015-02-23 06:03:38 +08:00
|
|
|
PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeUDT)
|
|
|
|
}
|
|
|
|
|
2015-03-01 14:51:29 +08:00
|
|
|
void PDBSymDumper::dump(const PDBSymbolTypeVTable &Symbol) {
|
2015-02-23 06:03:38 +08:00
|
|
|
PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeVTable)
|
|
|
|
}
|
|
|
|
|
2015-03-01 14:51:29 +08:00
|
|
|
void PDBSymDumper::dump(const PDBSymbolTypeVTableShape &Symbol) {
|
2015-02-23 06:03:38 +08:00
|
|
|
PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeVTableShape)
|
|
|
|
}
|
|
|
|
|
2015-03-01 14:51:29 +08:00
|
|
|
void PDBSymDumper::dump(const PDBSymbolUnknown &Symbol) {
|
2015-02-23 06:03:38 +08:00
|
|
|
PDB_SYMDUMP_UNREACHABLE(PDBSymbolUnknown)
|
|
|
|
}
|
|
|
|
|
2015-03-01 14:51:29 +08:00
|
|
|
void PDBSymDumper::dump(const PDBSymbolUsingNamespace &Symbol) {
|
2015-02-23 06:03:38 +08:00
|
|
|
PDB_SYMDUMP_UNREACHABLE(PDBSymbolUsingNamespace)
|
|
|
|
}
|