mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-16 12:24:03 +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:
@ -292,11 +292,11 @@ static void dumpInput(StringRef File) {
|
||||
reportError(File, EC);
|
||||
return;
|
||||
}
|
||||
std::unique_ptr<Binary> Binary = std::move(BinaryOrErr.get());
|
||||
Binary &Binary = *BinaryOrErr.get();
|
||||
|
||||
if (Archive *Arc = dyn_cast<Archive>(Binary.get()))
|
||||
if (Archive *Arc = dyn_cast<Archive>(&Binary))
|
||||
dumpArchive(Arc);
|
||||
else if (ObjectFile *Obj = dyn_cast<ObjectFile>(Binary.get()))
|
||||
else if (ObjectFile *Obj = dyn_cast<ObjectFile>(&Binary))
|
||||
dumpObject(Obj);
|
||||
else
|
||||
reportError(File, readobj_error::unrecognized_file_format);
|
||||
|
Reference in New Issue
Block a user