From f734a8bae7d78d3c035c77354f21383024e3fc73 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Fri, 20 Feb 2015 18:44:17 +0000 Subject: Get the function specific subtarget. llvm-svn: 230038 --- llvm/lib/CodeGen/Analysis.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/Analysis.cpp') diff --git a/llvm/lib/CodeGen/Analysis.cpp b/llvm/lib/CodeGen/Analysis.cpp index 2e8af9eb004..e50b846ddd8 100644 --- a/llvm/lib/CodeGen/Analysis.cpp +++ b/llvm/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, -- cgit v1.2.3