More code not compiled by CMake. :(.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121387 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Michael J. Spencer
2010-12-09 18:06:07 +00:00
parent 014e189069
commit f2f516fc26
2 changed files with 14 additions and 5 deletions

View File

@@ -43,6 +43,7 @@
#include "llvm/Support/Host.h"
#include "llvm/Support/Program.h"
#include "llvm/Support/Signals.h"
#include "llvm/Support/system_error.h"
#include "llvm/Config/config.h"
#include <cstdlib>
#include <unistd.h>
@@ -221,9 +222,12 @@ const void* LTOCodeGenerator::compile(size_t* length, std::string& errMsg)
if ( !asmResult ) {
// remove old buffer if compile() called twice
delete _nativeObjectFile;
// read .o file into memory buffer
_nativeObjectFile = MemoryBuffer::getFile(uniqueObjStr.c_str(),&errMsg);
error_code ec;
_nativeObjectFile = MemoryBuffer::getFile(uniqueObjStr.c_str(), ec);
if (ec)
errMsg = ec.message();
}
// remove temp files