mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-27 06:54:30 +00:00
reformulate CallSiteBase::getCallee to adapt to CallInst::ArgOffset, and make it work even if CallInst::op_* are private
llvm-svn: 107392
This commit is contained in:
parent
48effae6f6
commit
cf64605ccb
@ -273,7 +273,9 @@ private:
|
||||
// of the op_*() functions here. See CallSite::getCallee.
|
||||
//
|
||||
if (isCall())
|
||||
return getInstruction()->op_begin(); // Unchanged (ATM)
|
||||
return CallInst::ArgOffset
|
||||
? getInstruction()->op_begin() // Unchanged
|
||||
: getInstruction()->op_end() - 1; // Skip Function
|
||||
else
|
||||
return getInstruction()->op_end() - 3; // Skip BB, BB, Function
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user