summaryrefslogtreecommitdiff
path: root/lib/IRReader
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-09-03 17:31:46 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-09-03 17:31:46 +0000
commit6d66a1cd2f6c47361bb9f294d7d2af1530f27914 (patch)
treef0c10e05a61d6ae886434d89d3e11da15963b973 /lib/IRReader
parent38a4f3bbec129553e4fd91ad3a69e9bbbbfa1ddf (diff)
Pass a && to getLazyBitcodeModule.
This forces callers to use std::move when calling it. It is somewhat odd to have code with std::move that doesn't always move, but it is also odd to have code without std::move that sometimes moves. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217049 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IRReader')
-rw-r--r--lib/IRReader/IRReader.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/IRReader/IRReader.cpp b/lib/IRReader/IRReader.cpp
index a50e3865285..342fc5b27c8 100644
--- a/lib/IRReader/IRReader.cpp
+++ b/lib/IRReader/IRReader.cpp
@@ -35,7 +35,8 @@ getLazyIRModule(std::unique_ptr<MemoryBuffer> Buffer, SMDiagnostic &Err,
if (isBitcode((const unsigned char *)Buffer->getBufferStart(),
(const unsigned char *)Buffer->getBufferEnd())) {
std::string ErrMsg;
- ErrorOr<Module *> ModuleOrErr = getLazyBitcodeModule(Buffer, Context);
+ ErrorOr<Module *> ModuleOrErr =
+ getLazyBitcodeModule(std::move(Buffer), Context);
if (std::error_code EC = ModuleOrErr.getError()) {
Err = SMDiagnostic(Buffer->getBufferIdentifier(), SourceMgr::DK_Error,
EC.message());