From 0bbf62fce85e3c6f8febdef0c7e67bbecdf067e7 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Fri, 20 Feb 2015 18:44:17 +0000 Subject: [PATCH] Get the function specific subtarget. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230038 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/Analysis.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/CodeGen/Analysis.cpp b/lib/CodeGen/Analysis.cpp index 2e8af9eb004..e50b846ddd8 100644 --- a/lib/CodeGen/Analysis.cpp +++ b/lib/CodeGen/Analysis.cpp @@ -518,8 +518,9 @@ bool llvm::isInTailCallPosition(ImmutableCallSite CS, const TargetMachine &TM) { return false; } + const Function *F = ExitBB->getParent(); return returnTypeIsEligibleForTailCall( - ExitBB->getParent(), I, Ret, *TM.getSubtargetImpl()->getTargetLowering()); + F, I, Ret, *TM.getSubtargetImpl(*F)->getTargetLowering()); } bool llvm::returnTypeIsEligibleForTailCall(const Function *F,