mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-03 12:18:00 +00:00
MemoryBuffer now return an error_code and returns a OwningPtr<MemoryBuffer> via an out parm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121958 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -224,10 +224,10 @@ const void* LTOCodeGenerator::compile(size_t* length, std::string& errMsg)
|
||||
delete _nativeObjectFile;
|
||||
|
||||
// read .o file into memory buffer
|
||||
error_code ec;
|
||||
_nativeObjectFile = MemoryBuffer::getFile(uniqueObjStr.c_str(), ec);
|
||||
if (ec)
|
||||
OwningPtr<MemoryBuffer> BuffPtr;
|
||||
if (error_code ec = MemoryBuffer::getFile(uniqueObjStr.c_str(),BuffPtr))
|
||||
errMsg = ec.message();
|
||||
_nativeObjectFile = BuffPtr.take();
|
||||
}
|
||||
|
||||
// remove temp files
|
||||
|
Reference in New Issue
Block a user