[InlineFunction] use getFunction(); NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295185 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Sanjay Patel 2017-02-15 15:22:18 +00:00
parent b529f91924
commit 0279eb85ba

View File

@ -1223,7 +1223,7 @@ static Value *HandleByValArgument(Value *Arg, Instruction *TheCall,
PointerType *ArgTy = cast<PointerType>(Arg->getType());
Type *AggTy = ArgTy->getElementType();
Function *Caller = TheCall->getParent()->getParent();
Function *Caller = TheCall->getFunction();
// If the called function is readonly, then it could not mutate the caller's
// copy of the byval'd memory. In this case, it is safe to elide the copy and
@ -1460,8 +1460,8 @@ static void updateCalleeCount(BlockFrequencyInfo &CallerBFI, BasicBlock *CallBB,
bool llvm::InlineFunction(CallSite CS, InlineFunctionInfo &IFI,
AAResults *CalleeAAR, bool InsertLifetime) {
Instruction *TheCall = CS.getInstruction();
assert(TheCall->getParent() && TheCall->getParent()->getParent() &&
"Instruction not in function!");
assert(TheCall->getParent() && TheCall->getFunction()
&& "Instruction not in function!");
// If IFI has any state in it, zap it before we fill it in.
IFI.reset();