summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression/IRForTarget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Expression/IRForTarget.cpp')
-rw-r--r--lldb/source/Expression/IRForTarget.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/lldb/source/Expression/IRForTarget.cpp b/lldb/source/Expression/IRForTarget.cpp
index 345ae349633..e220b16f00c 100644
--- a/lldb/source/Expression/IRForTarget.cpp
+++ b/lldb/source/Expression/IRForTarget.cpp
@@ -579,7 +579,23 @@ IRForTarget::MaybeHandleCall(Module &M,
Function *fun = C->getCalledFunction();
if (fun == NULL)
- return true;
+ {
+ Value *val = C->getCalledValue();
+
+ ConstantExpr *const_expr = dyn_cast<ConstantExpr>(val);
+
+ if (const_expr && const_expr->getOpcode() == Instruction::BitCast)
+ {
+ fun = dyn_cast<Function>(const_expr->getOperand(0));
+
+ if (!fun)
+ return true;
+ }
+ else
+ {
+ return true;
+ }
+ }
clang::NamedDecl *fun_decl = DeclForGlobalValue(M, fun);
uint64_t fun_addr;
OpenPOWER on IntegriCloud