summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
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
commit3f6481d0d31674dd3e3e772ffa4dc6df1c9fdb3d (patch)
treef539546983e5b8acd1d9764c03f3caa909043bc3 /llvm/lib/Transforms
parent5d457dede903aa484a1b478ca73188818c6d8c7d (diff)
downloadbcm5719-llvm-3f6481d0d31674dd3e3e772ffa4dc6df1c9fdb3d.tar.gz
bcm5719-llvm-3f6481d0d31674dd3e3e772ffa4dc6df1c9fdb3d.zip
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. llvm-svn: 214516
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/SampleProfile.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/SampleProfile.cpp b/llvm/lib/Transforms/Scalar/SampleProfile.cpp
index 73c97ffeef4..56c57373a76 100644
--- a/llvm/lib/Transforms/Scalar/SampleProfile.cpp
+++ b/llvm/lib/Transforms/Scalar/SampleProfile.cpp
@@ -457,8 +457,8 @@ bool SampleModuleProfile::loadText() {
M.getContext().diagnose(DiagnosticInfoSampleProfile(Filename.data(), Msg));
return false;
}
- std::unique_ptr<MemoryBuffer> Buffer = std::move(BufferOrErr.get());
- line_iterator LineIt(*Buffer, '#');
+ MemoryBuffer &Buffer = *BufferOrErr.get();
+ line_iterator LineIt(Buffer, '#');
// Read the profile of each function. Since each function may be
// mentioned more than once, and we are collecting flat profiles,
OpenPOWER on IntegriCloud