aboutsummaryrefslogtreecommitdiffstats
path: root/tools/llvm-dwarfdump
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2014-07-21 00:45:20 -0700
committerStephen Hines <srhines@google.com>2014-07-21 00:45:20 -0700
commitc6a4f5e819217e1e12c458aed8e7b122e23a3a58 (patch)
tree81b7dd2bb4370a392f31d332a566c903b5744764 /tools/llvm-dwarfdump
parent19c6fbb3e8aaf74093afa08013134b61fa08f245 (diff)
downloadexternal_llvm-c6a4f5e819217e1e12c458aed8e7b122e23a3a58.zip
external_llvm-c6a4f5e819217e1e12c458aed8e7b122e23a3a58.tar.gz
external_llvm-c6a4f5e819217e1e12c458aed8e7b122e23a3a58.tar.bz2
Update LLVM for rebase to r212749.
Includes a cherry-pick of: r212948 - fixes a small issue with atomic calls Change-Id: Ib97bd980b59f18142a69506400911a6009d9df18
Diffstat (limited to 'tools/llvm-dwarfdump')
-rw-r--r--tools/llvm-dwarfdump/Android.mk2
-rw-r--r--tools/llvm-dwarfdump/llvm-dwarfdump.cpp13
2 files changed, 9 insertions, 6 deletions
diff --git a/tools/llvm-dwarfdump/Android.mk b/tools/llvm-dwarfdump/Android.mk
index 7908201..61049e8 100644
--- a/tools/llvm-dwarfdump/Android.mk
+++ b/tools/llvm-dwarfdump/Android.mk
@@ -14,6 +14,8 @@ llvm_dwarfdump_STATIC_LIBRARIES := \
libLLVMDebugInfo \
libLLVMObject \
libLLVMBitReader \
+ libLLVMMC \
+ libLLVMMCParser \
libLLVMCore \
libLLVMSupport \
diff --git a/tools/llvm-dwarfdump/llvm-dwarfdump.cpp b/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
index 46ac36e..f44b0e3 100644
--- a/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
+++ b/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
@@ -25,11 +25,11 @@
#include "llvm/Support/PrettyStackTrace.h"
#include "llvm/Support/Signals.h"
#include "llvm/Support/raw_ostream.h"
-#include "llvm/Support/system_error.h"
#include <algorithm>
#include <cstring>
#include <list>
#include <string>
+#include <system_error>
using namespace llvm;
using namespace object;
@@ -66,15 +66,16 @@ DumpType("debug-dump", cl::init(DIDT_All),
clEnumValEnd));
static void DumpInput(const StringRef &Filename) {
- std::unique_ptr<MemoryBuffer> Buff;
+ ErrorOr<std::unique_ptr<MemoryBuffer>> Buff =
+ MemoryBuffer::getFileOrSTDIN(Filename);
- if (error_code ec = MemoryBuffer::getFileOrSTDIN(Filename, Buff)) {
- errs() << Filename << ": " << ec.message() << "\n";
+ if (std::error_code EC = Buff.getError()) {
+ errs() << Filename << ": " << EC.message() << "\n";
return;
}
- ErrorOr<ObjectFile*> ObjOrErr(ObjectFile::createObjectFile(Buff.release()));
- if (error_code EC = ObjOrErr.getError()) {
+ ErrorOr<ObjectFile *> ObjOrErr(ObjectFile::createObjectFile(Buff.get()));
+ if (std::error_code EC = ObjOrErr.getError()) {
errs() << Filename << ": " << EC.message() << '\n';
return;
}