unique_ptrify IRObjectFile::createIRObjectFile

I took a guess at the changes to the gold plugin, because that doesn't
seem to build by default for me. Not sure what dependencies I might be
missing for that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217056 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie
2014-09-03 17:59:23 +00:00
parent 1892eabdef
commit faa7461fc3
4 changed files with 7 additions and 8 deletions
+2 -2
View File
@@ -296,7 +296,7 @@ static ld_plugin_status claim_file_hook(const ld_plugin_input_file *file,
BufferRef = Buffer->getMemBufferRef();
}
ErrorOr<object::IRObjectFile *> ObjOrErr =
ErrorOr<std::unique_ptr<object::IRObjectFile>> ObjOrErr =
object::IRObjectFile::createIRObjectFile(BufferRef, Context);
std::error_code EC = ObjOrErr.getError();
if (EC == BitcodeError::InvalidBitcodeSignature)
@@ -309,7 +309,7 @@ static ld_plugin_status claim_file_hook(const ld_plugin_input_file *file,
EC.message().c_str());
return LDPS_ERR;
}
std::unique_ptr<object::IRObjectFile> Obj(ObjOrErr.get());
std::unique_ptr<object::IRObjectFile> Obj = std::move(*ObjOrErr);
Modules.resize(Modules.size() + 1);
claimed_file &cf = Modules.back();