mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Remove some calls to std::move.
Instead of moving out the data in a ErrorOr<std::unique_ptr<Foo>>, get a reference to it. Thanks to David Blaikie for the suggestion. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214516 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -80,12 +80,12 @@ static void DumpInput(const StringRef &Filename) {
|
||||
errs() << Filename << ": " << EC.message() << '\n';
|
||||
return;
|
||||
}
|
||||
std::unique_ptr<ObjectFile> Obj = std::move(ObjOrErr.get());
|
||||
ObjectFile &Obj = *ObjOrErr.get();
|
||||
|
||||
std::unique_ptr<DIContext> DICtx(DIContext::getDWARFContext(*Obj));
|
||||
std::unique_ptr<DIContext> DICtx(DIContext::getDWARFContext(Obj));
|
||||
|
||||
outs() << Filename
|
||||
<< ":\tfile format " << Obj->getFileFormatName() << "\n\n";
|
||||
<< ":\tfile format " << Obj.getFileFormatName() << "\n\n";
|
||||
// Dump the complete DWARF structure.
|
||||
DICtx->dump(outs(), DumpType);
|
||||
}
|
||||
|
Reference in New Issue
Block a user