Changes in directory llvm-poolalloc/lib/PoolAllocate:
TransformFunctionBody.cpp updated: 1.53 -> 1.54 --- Log message: see through casts to underlying function pointers --- Diffs of the changes: (+4 -0) TransformFunctionBody.cpp | 4 ++++ 1 files changed, 4 insertions(+) Index: llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp diff -u llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.53 llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.54 --- llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.53 Mon Jun 19 09:55:28 2006 +++ llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp Tue Jun 27 20:13:50 2006 @@ -456,6 +456,10 @@ Function *CF = CS.getCalledFunction(); Instruction *TheCall = CS.getInstruction(); + if (ConstantExpr *CE = dyn_cast<ConstantExpr>(CS.getCalledValue())) + if (CE->getOpcode() == Instruction::Cast && isa<Function>(CE->getOperand(0))) + CF = cast<Function>(CE->getOperand(0)); + // If this function is one of the memory manipulating functions built into // libc, emulate it with pool calls as appropriate. if (CF && CF->isExternal()) _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits