[readobj] Expand CodeView dumping functionality
This rewrites and expands the existing codeview dumping functionality in
llvm-readobj using techniques similar to those in lib/Object. This defines a
number of new records and enums useful for reading memory mapped codeview
sections in COFF objects.
The dumper is intended as a testing tool for LLVM as it grows more codeview
output capabilities.
Reviewers: majnemer
Differential Revision: http://reviews.llvm.org/D16104
llvm-svn: 257658
diff --git a/llvm/tools/llvm-pdbdump/FunctionDumper.cpp b/llvm/tools/llvm-pdbdump/FunctionDumper.cpp
index 9584812..7f41817 100644
--- a/llvm/tools/llvm-pdbdump/FunctionDumper.cpp
+++ b/llvm/tools/llvm-pdbdump/FunctionDumper.cpp
@@ -27,6 +27,7 @@
#include "llvm/Support/Format.h"
using namespace llvm;
+using namespace llvm::codeview;
namespace {
template <class T>
@@ -57,10 +58,10 @@
Symbol.getSession().getConcreteSymbolById<PDBSymbolTypeUDT>(
ClassParentId);
- PDB_CallingConv CC = Symbol.getCallingConvention();
+ CallingConvention CC = Symbol.getCallingConvention();
bool ShouldDumpCallingConvention = true;
- if ((ClassParent && CC == PDB_CallingConv::Thiscall) ||
- (!ClassParent && CC == PDB_CallingConv::NearStdcall)) {
+ if ((ClassParent && CC == CallingConvention::ThisCall) ||
+ (!ClassParent && CC == CallingConvention::NearStdCall)) {
ShouldDumpCallingConvention = false;
}
@@ -152,12 +153,12 @@
Printer << " ";
auto ClassParent = Symbol.getClassParent();
- PDB_CallingConv CC = Signature->getCallingConvention();
+ CallingConvention CC = Signature->getCallingConvention();
if (Pointer != FunctionDumper::PointerType::None)
Printer << "(";
- if ((ClassParent && CC != PDB_CallingConv::Thiscall) ||
- (!ClassParent && CC != PDB_CallingConv::NearStdcall)) {
+ if ((ClassParent && CC != CallingConvention::ThisCall) ||
+ (!ClassParent && CC != CallingConvention::NearStdCall)) {
WithColor(Printer, PDB_ColorItem::Keyword).get()
<< Signature->getCallingConvention() << " ";
}