From dff4069042e6f7b4bc7211b8e9ba3377ee01c33c Mon Sep 17 00:00:00 2001 From: Sean Bartell Date: Tue, 28 Apr 2015 20:21:10 -0500 Subject: Fix assertion failure in getDirectCallTarget It failed when the function being called is a bitcasted alias. --- lib/Module/ModuleUtil.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Module') diff --git a/lib/Module/ModuleUtil.cpp b/lib/Module/ModuleUtil.cpp index 5f7ed35e..1cf9c35c 100644 --- a/lib/Module/ModuleUtil.cpp +++ b/lib/Module/ModuleUtil.cpp @@ -446,7 +446,7 @@ Function *klee::getDirectCallTarget(CallSite cs) { return f; } else if (llvm::ConstantExpr *ce = dyn_cast(v)) { if (ce->getOpcode()==Instruction::BitCast) - if (Function *f = dyn_cast(ce->getOperand(0))) + if (Function *f = dyn_cast(ce->getOperand(0)->stripPointerCasts())) return f; // NOTE: This assert may fire, it isn't necessarily a problem and -- cgit 1.4.1