[llvm] r216427 - ExecutionEngine: address review comments
Dylan Noblesmith
nobled at dreamwidth.org
Mon Aug 25 19:03:28 PDT 2014
Author: nobled
Date: Mon Aug 25 21:03:28 2014
New Revision: 216427
URL: http://llvm.org/viewvc/llvm-project?rev=216427&view=rev
Log:
ExecutionEngine: address review comments
Modified:
llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp
Modified: llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp?rev=216427&r1=216426&r2=216427&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp Mon Aug 25 21:03:28 2014
@@ -277,17 +277,16 @@ void *ArgvArray::reset(LLVMContext &C, E
for (unsigned i = 0; i != InputArgv.size(); ++i) {
unsigned Size = InputArgv[i].size()+1;
- auto DestOwner = make_unique<char[]>(Size);
- char *Dest = DestOwner.get();
- Values.push_back(std::move(DestOwner));
- DEBUG(dbgs() << "JIT: ARGV[" << i << "] = " << (void*)Dest << "\n");
+ auto Dest = make_unique<char[]>(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
More information about the llvm-commits
mailing list