mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user