aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
diff options
context:
space:
mode:
authorDylan Noblesmith <nobled@dreamwidth.org>2014-08-26 02:03:28 +0000
committerDylan Noblesmith <nobled@dreamwidth.org>2014-08-26 02:03:28 +0000
commit4b535d1930577a269f4a6ac14e536b152011c2b7 (patch)
tree3784e812b8f1f6cc830d203f4862e337ae273b99 /llvm/lib/ExecutionEngine/ExecutionEngine.cpp
parent17f05a3fc6c515a636b30776780ce03410495e06 (diff)
downloadllvm-4b535d1930577a269f4a6ac14e536b152011c2b7.zip
llvm-4b535d1930577a269f4a6ac14e536b152011c2b7.tar.gz
llvm-4b535d1930577a269f4a6ac14e536b152011c2b7.tar.bz2
ExecutionEngine: address review comments
llvm-svn: 216427
Diffstat (limited to 'llvm/lib/ExecutionEngine/ExecutionEngine.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/ExecutionEngine.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
index b31814a..5d12d69 100644
--- a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
+++ b/llvm/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<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