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
This commit is contained in:
Rafael Espindola
2014-09-03 17:31:46 +00:00
parent 38a4f3bbec
commit 6d66a1cd2f
7 changed files with 15 additions and 12 deletions

View File

@@ -270,7 +270,7 @@ llvm::object::IRObjectFile::createIRObjectFile(MemoryBufferRef Object,
std::unique_ptr<MemoryBuffer> Buff(MemoryBuffer::getMemBuffer(Object, false));
ErrorOr<Module *> MOrErr = getLazyBitcodeModule(Buff, Context);
ErrorOr<Module *> MOrErr = getLazyBitcodeModule(std::move(Buff), Context);
if (std::error_code EC = MOrErr.getError())
return EC;