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
This commit is contained in:
Rafael Espindola
2014-09-03 17:31:46 +00:00
parent c2ca095c4d
commit cbfc7723a8
7 changed files with 15 additions and 12 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ LLVMBool LLVMGetBitcodeModuleInContext(LLVMContextRef ContextRef,
std::unique_ptr<MemoryBuffer> Owner(unwrap(MemBuf));
ErrorOr<Module *> ModuleOrErr =
getLazyBitcodeModule(Owner, *unwrap(ContextRef));
getLazyBitcodeModule(std::move(Owner), *unwrap(ContextRef));
Owner.release();
if (std::error_code EC = ModuleOrErr.getError()) {