mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 06:25:18 +00:00
We don't need a null terminator for the output file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128098 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -209,8 +209,11 @@ const void* LTOCodeGenerator::compile(size_t* length, std::string& errMsg)
|
||||
|
||||
// read .o file into memory buffer
|
||||
OwningPtr<MemoryBuffer> BuffPtr;
|
||||
if (error_code ec = MemoryBuffer::getFile(uniqueObjStr.c_str(),BuffPtr))
|
||||
if (error_code ec = MemoryBuffer::getFile(uniqueObjStr.c_str(), BuffPtr,
|
||||
-1, false)) {
|
||||
errMsg = ec.message();
|
||||
return NULL;
|
||||
}
|
||||
_nativeObjectFile = BuffPtr.take();
|
||||
|
||||
// remove temp files
|
||||
|
Reference in New Issue
Block a user