mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-11 21:57:55 +00:00
reformulate CallSite::getCallee to adapt to CallInst::ArgOffset, and make it work even if CallInst::op_* are private
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107390 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c6f00e701e
commit
fa680ea1eb
@ -33,7 +33,9 @@ using namespace llvm;
|
||||
User::op_iterator CallSite::getCallee() const {
|
||||
Instruction *II(getInstruction());
|
||||
return isCall()
|
||||
? cast<CallInst>(II)->op_begin()
|
||||
? (CallInst::ArgOffset
|
||||
? cast</*FIXME: CallInst*/User>(II)->op_begin()
|
||||
: cast</*FIXME: CallInst*/User>(II)->op_end() - 1)
|
||||
: cast<InvokeInst>(II)->op_end() - 3; // Skip BB, BB, Function
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user