[llvm-commits] CVS: poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue Feb 24 16:10:01 PST 2004
Changes in directory poolalloc/lib/PoolAllocate:
TransformFunctionBody.cpp updated: 1.19 -> 1.20
---
Log message:
Fix a problem where we were passing an int parameter where poolalloc expected
a uint
---
Diffs of the changes: (+3 -0)
Index: poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp
diff -u poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.19 poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.20
--- poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.19 Sat Feb 21 22:09:50 2004
+++ poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp Tue Feb 24 16:09:41 2004
@@ -134,6 +134,9 @@
Value *Size) {
std::string Name = I->getName(); I->setName("");
+ if (Size->getType() != Type::UIntTy)
+ Size = new CastInst(Size, Type::UIntTy, Size->getName(), I);
+
// Insert a call to poolalloc
Value *PH = getPoolHandle(I);
Instruction *V = new CallInst(PAInfo.PoolAlloc, make_vector(PH, Size, 0),
More information about the llvm-commits
mailing list