[llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/JIT.cpp JITEmitter.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sat Jan 8 12:07:18 PST 2005
Changes in directory llvm/lib/ExecutionEngine/JIT:
JIT.cpp updated: 1.52 -> 1.53
JITEmitter.cpp updated: 1.60 -> 1.61
---
Log message:
Silence VS warnings.
---
Diffs of the changes: (+3 -2)
Index: llvm/lib/ExecutionEngine/JIT/JIT.cpp
diff -u llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.52 llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.53
--- llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.52 Sun Dec 5 01:19:16 2004
+++ llvm/lib/ExecutionEngine/JIT/JIT.cpp Sat Jan 8 14:07:03 2005
@@ -284,7 +284,8 @@
// 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);
Index: llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp
diff -u llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.60 llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.61
--- llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.60 Mon Dec 13 10:04:04 2004
+++ llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp Sat Jan 8 14:07:03 2005
@@ -360,7 +360,7 @@
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);
More information about the llvm-commits
mailing list