diff options
Diffstat (limited to 'lib/ExecutionEngine/JIT/JIT.cpp')
-rw-r--r-- | lib/ExecutionEngine/JIT/JIT.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ExecutionEngine/JIT/JIT.cpp b/lib/ExecutionEngine/JIT/JIT.cpp index 2bab9e735b..1d781d6e4e 100644 --- a/lib/ExecutionEngine/JIT/JIT.cpp +++ b/lib/ExecutionEngine/JIT/JIT.cpp @@ -284,7 +284,8 @@ void *JIT::getOrEmitGlobalVariable(const GlobalVariable *GV) { // If the global hasn't been emitted to memory yet, allocate space. We will // actually initialize the global after current function has finished // compilation. - Ptr =new char[getTargetData().getTypeSize(GV->getType()->getElementType())]; + uint64_t S = getTargetData().getTypeSize(GV->getType()->getElementType()); + Ptr = new char[(size_t)S]; PendingGlobals.push_back(GV); } addGlobalMapping(GV, Ptr); |