summaryrefslogtreecommitdiff
path: root/lib/Object/ObjectFile.cpp
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 /lib/Object/ObjectFile.cpp
parent908b6ddad6dac40c4c0453d690f0db9422b48b10 (diff)
downloadllvm-333fb04506233255f10d8095c9e2de5e5f0fdc6f.tar.gz
llvm-333fb04506233255f10d8095c9e2de5e5f0fdc6f.tar.bz2
llvm-333fb04506233255f10d8095c9e2de5e5f0fdc6f.tar.xz
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 'lib/Object/ObjectFile.cpp')
-rw-r--r--lib/Object/ObjectFile.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Object/ObjectFile.cpp b/lib/Object/ObjectFile.cpp
index 3ea39b3793..2a6e086137 100644
--- a/lib/Object/ObjectFile.cpp
+++ b/lib/Object/ObjectFile.cpp
@@ -15,6 +15,7 @@
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
+#include "llvm/Support/system_error.h"
using namespace llvm;
using namespace object;
@@ -62,5 +63,6 @@ ObjectFile *ObjectFile::createObjectFile(MemoryBuffer *Object) {
}
ObjectFile *ObjectFile::createObjectFile(StringRef ObjectPath) {
- return createObjectFile(MemoryBuffer::getFile(ObjectPath));
+ error_code ec;
+ return createObjectFile(MemoryBuffer::getFile(ObjectPath, ec));
}