remove the private hack from CallInst, it was not supposed to hit the branch anyway

as a positive consequence the CallSite::getCallee() methods now can be rewritten to be
a bit more efficient

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110380 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Gabor Greif
2010-08-05 21:25:49 +00:00
parent 9850a28866
commit 3ecf355c7a
3 changed files with 5 additions and 28 deletions

View File

@ -33,7 +33,7 @@ using namespace llvm;
User::op_iterator CallSite::getCallee() const {
Instruction *II(getInstruction());
return isCall()
? cast</*FIXME: CallInst*/User>(II)->op_end() - 1 // Skip Callee
? cast<CallInst>(II)->op_end() - 1 // Skip Callee
: cast<InvokeInst>(II)->op_end() - 3; // Skip BB, BB, Callee
}