summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IRReader/IRReader.cpp
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
commit688121571ae35f2f767ae16aa84c8df4a889ab72 (patch)
tree7e3e176b69634344a4474262d04550eee100b48c /llvm/lib/IRReader/IRReader.cpp
parent99b96f42d6d3609d706fb38a85abee2e7127d304 (diff)
downloadbcm5719-llvm-688121571ae35f2f767ae16aa84c8df4a889ab72.tar.gz
bcm5719-llvm-688121571ae35f2f767ae16aa84c8df4a889ab72.zip
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. llvm-svn: 217049
Diffstat (limited to 'llvm/lib/IRReader/IRReader.cpp')
-rw-r--r--llvm/lib/IRReader/IRReader.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/IRReader/IRReader.cpp b/llvm/lib/IRReader/IRReader.cpp
index a50e3865285..342fc5b27c8 100644
--- a/llvm/lib/IRReader/IRReader.cpp
+++ b/llvm/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());
OpenPOWER on IntegriCloud