Use copy initialization to initialize std::unique_ptr.

Thanks to David Blaikie for the suggestion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215867 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2014-08-17 23:38:08 +00:00
parent 4570cfa5e4
commit 6de46b5183
3 changed files with 3 additions and 3 deletions

View File

@ -157,7 +157,7 @@ ObjectBufferStream* MCJIT::emitObject(Module *M) {
if (ObjCache) {
// MemoryBuffer is a thin wrapper around the actual memory, so it's OK
// to create a temporary object here and delete it after the call.
std::unique_ptr<MemoryBuffer> MB(CompiledObject->getMemBuffer());
std::unique_ptr<MemoryBuffer> MB = CompiledObject->getMemBuffer();
ObjCache->notifyObjectCompiled(M, MB.get());
}