summaryrefslogtreecommitdiff
path: root/tools/macho-dump
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2010-12-09 17:36:48 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2010-12-09 17:36:48 +0000
commit333fb04506233255f10d8095c9e2de5e5f0fdc6f (patch)
tree29b15348801de3482b07a438b1fb1f2ba094d3d2 /tools/macho-dump
parent908b6ddad6dac40c4c0453d690f0db9422b48b10 (diff)
Support/MemoryBuffer: Replace all uses of std::string *ErrMsg with error_code &ec. And fix clients.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121379 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/macho-dump')
-rw-r--r--tools/macho-dump/macho-dump.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/macho-dump/macho-dump.cpp b/tools/macho-dump/macho-dump.cpp
index 02fa36680f8..982443a2ce0 100644
--- a/tools/macho-dump/macho-dump.cpp
+++ b/tools/macho-dump/macho-dump.cpp
@@ -19,6 +19,7 @@
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/raw_ostream.h"
+#include "llvm/Support/system_error.h"
using namespace llvm;
using namespace llvm::object;
@@ -365,10 +366,11 @@ int main(int argc, char **argv) {
// Load the input file.
std::string ErrorStr;
+ error_code ec;
OwningPtr<MemoryBuffer> InputBuffer(
- MemoryBuffer::getFileOrSTDIN(InputFile, &ErrorStr));
+ MemoryBuffer::getFileOrSTDIN(InputFile, ec));
if (!InputBuffer)
- return Error("unable to read input: '" + ErrorStr + "'");
+ return Error("unable to read input: '" + ec.message() + "'");
// Construct the Mach-O wrapper object.
OwningPtr<MachOObject> InputObject(