aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Support/CallSite.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Support/CallSite.h')
-rw-r--r--include/llvm/Support/CallSite.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/include/llvm/Support/CallSite.h b/include/llvm/Support/CallSite.h
index 5c6632b..9b6a409 100644
--- a/include/llvm/Support/CallSite.h
+++ b/include/llvm/Support/CallSite.h
@@ -261,13 +261,10 @@ private:
}
IterTy getCallee() const {
- // FIXME: this is slow, since we do not have the fast versions
- // of the op_*() functions here. See CallSite::getCallee.
- //
- if (isCall())
- return getInstruction()->op_end() - 1; // Skip Callee
- else
- return getInstruction()->op_end() - 3; // Skip BB, BB, Callee
+ if (isCall()) // Skip Callee
+ return cast<CallInst>(getInstruction())->op_end() - 1;
+ else // Skip BB, BB, Callee
+ return cast<InvokeInst>(getInstruction())->op_end() - 3;
}
};