summaryrefslogtreecommitdiff
path: root/tools/obj2yaml
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-08-01 14:31:55 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-08-01 14:31:55 +0000
commit9aa0b5e11e4827c21883e2054600968db8d6a54d (patch)
treeecc45b4420ca070db57cf17dd2bce935c37b9ad9 /tools/obj2yaml
parenta36429f26d0b7a8eccdb27c649baa58926881cd8 (diff)
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
Diffstat (limited to 'tools/obj2yaml')
-rw-r--r--tools/obj2yaml/obj2yaml.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/obj2yaml/obj2yaml.cpp b/tools/obj2yaml/obj2yaml.cpp
index 8d1c1409f18..dbf5a4acd16 100644
--- a/tools/obj2yaml/obj2yaml.cpp
+++ b/tools/obj2yaml/obj2yaml.cpp
@@ -36,9 +36,9 @@ static std::error_code dumpInput(StringRef File) {
if (std::error_code EC = BinaryOrErr.getError())
return EC;
- std::unique_ptr<Binary> Binary = std::move(BinaryOrErr.get());
+ Binary &Binary = *BinaryOrErr.get();
// TODO: If this is an archive, then burst it and dump each entry
- if (ObjectFile *Obj = dyn_cast<ObjectFile>(Binary.get()))
+ if (ObjectFile *Obj = dyn_cast<ObjectFile>(&Binary))
return dumpObject(*Obj);
return obj2yaml_error::unrecognized_file_format;