summaryrefslogtreecommitdiff
path: root/tools/llvm-size
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-07-31 03:12:45 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-07-31 03:12:45 +0000
commit79002da9262eb6a17a955c3bb5fecda852998b5c (patch)
treee2fb704fc91cfca9955235284dba43a58d20dc14 /tools/llvm-size
parent0a8cc452b16c2e3c03e409329b4104403890d05c (diff)
Use std::unique_ptr to make the ownership explicit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214377 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-size')
-rw-r--r--tools/llvm-size/llvm-size.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/llvm-size/llvm-size.cpp b/tools/llvm-size/llvm-size.cpp
index 50b52200ff4..0664d535b8b 100644
--- a/tools/llvm-size/llvm-size.cpp
+++ b/tools/llvm-size/llvm-size.cpp
@@ -453,12 +453,12 @@ static void PrintFileSectionSizes(StringRef file) {
}
// Attempt to open the binary.
- ErrorOr<Binary *> BinaryOrErr = createBinary(file);
+ ErrorOr<std::unique_ptr<Binary>> BinaryOrErr = createBinary(file);
if (std::error_code EC = BinaryOrErr.getError()) {
errs() << ToolName << ": " << file << ": " << EC.message() << ".\n";
return;
}
- std::unique_ptr<Binary> binary(BinaryOrErr.get());
+ std::unique_ptr<Binary> binary = std::move(BinaryOrErr.get());
if (Archive *a = dyn_cast<Archive>(binary.get())) {
// This is an archive. Iterate over each member and display its sizes.