summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-size/llvm-size.cpp
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
commit437b0d588703adbfb01e7c77ec8f40d85ddd573b (patch)
treef7e01d94b89564ba63da611328bf9fd32f0465a8 /llvm/tools/llvm-size/llvm-size.cpp
parentdb9552f4a4ca7cd8edf786037b2db948dfac1b1e (diff)
downloadbcm5719-llvm-437b0d588703adbfb01e7c77ec8f40d85ddd573b.tar.gz
bcm5719-llvm-437b0d588703adbfb01e7c77ec8f40d85ddd573b.zip
Use std::unique_ptr to make the ownership explicit.
llvm-svn: 214377
Diffstat (limited to 'llvm/tools/llvm-size/llvm-size.cpp')
-rw-r--r--llvm/tools/llvm-size/llvm-size.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/tools/llvm-size/llvm-size.cpp b/llvm/tools/llvm-size/llvm-size.cpp
index 50b52200ff4..0664d535b8b 100644
--- a/llvm/tools/llvm-size/llvm-size.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud