From 759a71a1fa8022c3e48a03e5cbf84549c37d7fef Mon Sep 17 00:00:00 2001 From: Dylan Noblesmith Date: Tue, 26 Aug 2014 02:03:28 +0000 Subject: [PATCH] ExecutionEngine: address review comments git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216427 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/ExecutionEngine/ExecutionEngine.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp index b31814a1753..5d12d69baac 100644 --- a/lib/ExecutionEngine/ExecutionEngine.cpp +++ b/lib/ExecutionEngine/ExecutionEngine.cpp @@ -277,17 +277,16 @@ void *ArgvArray::reset(LLVMContext &C, ExecutionEngine *EE, for (unsigned i = 0; i != InputArgv.size(); ++i) { unsigned Size = InputArgv[i].size()+1; - auto DestOwner = make_unique(Size); - char *Dest = DestOwner.get(); - Values.push_back(std::move(DestOwner)); - DEBUG(dbgs() << "JIT: ARGV[" << i << "] = " << (void*)Dest << "\n"); + auto Dest = make_unique(Size); + DEBUG(dbgs() << "JIT: ARGV[" << i << "] = " << (void*)Dest.get() << "\n"); - std::copy(InputArgv[i].begin(), InputArgv[i].end(), Dest); + std::copy(InputArgv[i].begin(), InputArgv[i].end(), Dest.get()); Dest[Size-1] = 0; // Endian safe: Array[i] = (PointerTy)Dest; - EE->StoreValueToMemory(PTOGV(Dest), (GenericValue*)(&Array[i*PtrSize]), - SBytePtr); + EE->StoreValueToMemory(PTOGV(Dest.get()), + (GenericValue*)(&Array[i*PtrSize]), SBytePtr); + Values.push_back(std::move(Dest)); } // Null terminate it