diff options
author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2015-06-23 20:09:03 +0000 |
---|---|---|
committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2015-06-23 20:09:03 +0000 |
commit | 3f1bc3b2bbfbf3bedfdc5f6115c27407335bf080 (patch) | |
tree | c370936076995437790dad667c324f919980e79d /llvm/lib/Object/FaultMapParser.cpp | |
parent | bf0aa08bba2e23e152c60eaca17512ea6b8c1c71 (diff) | |
download | llvm-3f1bc3b2bbfbf3bedfdc5f6115c27407335bf080.zip llvm-3f1bc3b2bbfbf3bedfdc5f6115c27407335bf080.tar.gz llvm-3f1bc3b2bbfbf3bedfdc5f6115c27407335bf080.tar.bz2 |
Revert "[FaultMaps] Move FaultMapParser to Object/"
This reverts commit r240364 (git c49542e5bb186). The issue r240364 was
trying to fix was fixed independently in r240362.
llvm-svn: 240448
Diffstat (limited to 'llvm/lib/Object/FaultMapParser.cpp')
-rw-r--r-- | llvm/lib/Object/FaultMapParser.cpp | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/llvm/lib/Object/FaultMapParser.cpp b/llvm/lib/Object/FaultMapParser.cpp deleted file mode 100644 index 6ce8a57..0000000 --- a/llvm/lib/Object/FaultMapParser.cpp +++ /dev/null @@ -1,61 +0,0 @@ -//===----------------------- FaultMapParser.cpp ---------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#include "llvm/Object/FaultMapParser.h" - -#include "llvm/Support/ErrorHandling.h" -#include "llvm/Support/Format.h" - -using namespace llvm; - -static const char *faultKindToString(FaultMapParser::FaultKind FT) { - switch (FT) { - default: - llvm_unreachable("unhandled fault type!"); - - case FaultMapParser::FaultingLoad: - return "FaultingLoad"; - } -} - -raw_ostream &llvm:: -operator<<(raw_ostream &OS, - const FaultMapParser::FunctionFaultInfoAccessor &FFI) { - OS << "Fault kind: " - << faultKindToString((FaultMapParser::FaultKind)FFI.getFaultKind()) - << ", faulting PC offset: " << FFI.getFaultingPCOffset() - << ", handling PC offset: " << FFI.getHandlerPCOffset(); - return OS; -} - -raw_ostream &llvm:: -operator<<(raw_ostream &OS, const FaultMapParser::FunctionInfoAccessor &FI) { - OS << "FunctionAddress: " << format_hex(FI.getFunctionAddr(), 8) - << ", NumFaultingPCs: " << FI.getNumFaultingPCs() << "\n"; - for (unsigned i = 0, e = FI.getNumFaultingPCs(); i != e; ++i) - OS << FI.getFunctionFaultInfoAt(i) << "\n"; - return OS; -} - -raw_ostream &llvm::operator<<(raw_ostream &OS, const FaultMapParser &FMP) { - OS << "Version: " << format_hex(FMP.getFaultMapVersion(), 2) << "\n"; - OS << "NumFunctions: " << FMP.getNumFunctions() << "\n"; - - if (FMP.getNumFunctions() == 0) - return OS; - - FaultMapParser::FunctionInfoAccessor FI; - - for (unsigned i = 0, e = FMP.getNumFunctions(); i != e; ++i) { - FI = (i == 0) ? FMP.getFirstFunctionInfo() : FI.getNextFunctionInfo(); - OS << FI; - } - - return OS; -} |