diff options
| author | Chris Lattner <sabre@nondot.org> | 2005-01-08 20:07:03 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2005-01-08 20:07:03 +0000 |
| commit | fa66dc78524df5d66e50bc39d967a5bc3f864039 (patch) | |
| tree | eb73538181c4004e901690f86e73dec7a752bde7 /llvm/lib/ExecutionEngine/JIT | |
| parent | feeab9f753d15eec6d447a70ff4fb4ae38111923 (diff) | |
| download | bcm5719-llvm-fa66dc78524df5d66e50bc39d967a5bc3f864039.tar.gz bcm5719-llvm-fa66dc78524df5d66e50bc39d967a5bc3f864039.zip | |
Silence VS warnings.
llvm-svn: 19390
Diffstat (limited to 'llvm/lib/ExecutionEngine/JIT')
| -rw-r--r-- | llvm/lib/ExecutionEngine/JIT/JIT.cpp | 3 | ||||
| -rw-r--r-- | llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/JIT.cpp b/llvm/lib/ExecutionEngine/JIT/JIT.cpp index 2bab9e735b5..1d781d6e4e2 100644 --- a/llvm/lib/ExecutionEngine/JIT/JIT.cpp +++ b/llvm/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); diff --git a/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp b/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp index 66034330159..bd00c964cca 100644 --- a/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp +++ b/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp @@ -360,7 +360,7 @@ void JITEmitter::emitConstantPool(MachineConstantPool *MCP) { unsigned TotalSize = 0; for (unsigned i = 0, e = Constants.size(); i != e; ++i) { const Type *Ty = Constants[i]->getType(); - unsigned Size = TheJIT->getTargetData().getTypeSize(Ty); + unsigned Size = (unsigned)TheJIT->getTargetData().getTypeSize(Ty); unsigned Alignment = TheJIT->getTargetData().getTypeAlignment(Ty); // Make sure to take into account the alignment requirements of the type. TotalSize = (TotalSize + Alignment-1) & ~(Alignment-1); |

