[llvm-commits] CVS: llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Tue Nov 4 19:03:01 PST 2003
Changes in directory llvm/lib/ExecutionEngine/Interpreter:
Execution.cpp updated: 1.104 -> 1.105
---
Log message:
Use regular old malloc to emulate malloc/alloca instructions.
---
Diffs of the changes: (+1 -2)
Index: llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
diff -u llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.104 llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.105
--- llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.104 Tue Nov 4 18:59:28 2003
+++ llvm/lib/ExecutionEngine/Interpreter/Execution.cpp Tue Nov 4 19:02:14 2003
@@ -546,8 +546,7 @@
unsigned NumElements = getOperandValue(I.getOperand(0), SF).UIntVal;
// Allocate enough memory to hold the type...
- // FIXME: Don't use CALLOC, use a tainted malloc.
- void *Memory = calloc(NumElements, TD.getTypeSize(Ty));
+ void *Memory = malloc(NumElements * TD.getTypeSize(Ty));
GenericValue Result = PTOGV(Memory);
assert(Result.PointerVal != 0 && "Null pointer returned by malloc!");
More information about the llvm-commits
mailing list