1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
llvm-mirror/lib/DebugInfo/PDB/PDBSymbolThunk.cpp
Chandler Carruth 33dabe4f44 Re-sort #include lines using my handy dandy ./utils/sort_includes.py
script. This is in preparation for changes to lots of include lines.

llvm-svn: 229088
2015-02-13 09:09:03 +00:00

41 lines
1.3 KiB
C++

//===- PDBSymbolThunk.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/PDBSymbol.h"
#include "llvm/DebugInfo/PDB/PDBSymbolThunk.h"
#include "llvm/Support/Format.h"
#include <utility>
using namespace llvm;
PDBSymbolThunk::PDBSymbolThunk(const IPDBSession &PDBSession,
std::unique_ptr<IPDBRawSymbol> Symbol)
: PDBSymbol(PDBSession, std::move(Symbol)) {}
void PDBSymbolThunk::dump(raw_ostream &OS, int Indent,
PDB_DumpLevel Level) const {
OS.indent(Indent);
OS << "thunk ";
PDB_ThunkOrdinal Ordinal = getThunkOrdinal();
uint32_t RVA = getRelativeVirtualAddress();
if (Ordinal == PDB_ThunkOrdinal::TrampIncremental) {
OS << format_hex(RVA, 10);
} else {
OS << "[" << format_hex(RVA, 10);
OS << " - " << format_hex(RVA + getLength(), 10) << "]";
}
OS << " (" << Ordinal << ")";
if (Ordinal == PDB_ThunkOrdinal::TrampIncremental)
OS << " -> " << format_hex(getTargetRelativeVirtualAddress(), 10);
OS << " ";
std::string Name = getName();
if (!Name.empty())
OS << Name;
}