Support/MemoryBuffer: Replace all uses of std::string *ErrMsg with error_code &ec. And fix clients.

llvm-svn: 121379
This commit is contained in:
Michael J. Spencer
2010-12-09 17:36:48 +00:00
parent f25faaaffb
commit 7b6fef82d4
23 changed files with 173 additions and 117 deletions

View File

@@ -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));
}