diff options
author | Sanjay Patel <spatel@rotateright.com> | 2017-02-15 15:22:18 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2017-02-15 15:22:18 +0000 |
commit | 288f075f8eb8df6c846aab8ef52d964de99c03a2 (patch) | |
tree | e66f3e2e42007b27bbddf0ac28d7b3edfe845715 /llvm/lib/Transforms/Utils/InlineFunction.cpp | |
parent | 22abde7860f364b5b55264963189344ddad1d1af (diff) | |
download | bcm5719-llvm-288f075f8eb8df6c846aab8ef52d964de99c03a2.tar.gz bcm5719-llvm-288f075f8eb8df6c846aab8ef52d964de99c03a2.zip |
[InlineFunction] use getFunction(); NFC
llvm-svn: 295185
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/InlineFunction.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp index f6f155691dd..bd3aa8d3867 100644 --- a/llvm/lib/Transforms/Utils/InlineFunction.cpp +++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp @@ -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(); |