summaryrefslogtreecommitdiff
path: root/tools/macho-dump/macho-dump.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/macho-dump/macho-dump.cpp')
-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(