mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
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
This commit is contained in:
@ -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));
|
||||
}
|
||||
|
Reference in New Issue
Block a user