From 2b214e7ad358f6cff7a14b038b387556ba33cc60 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Tue, 27 Jan 2015 01:01:36 +0000 Subject: [PATCH] Grab the TargetLowering info from the DAG rather than querying for a subtarget. llvm-svn: 227156 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index cb58e13..df0c4ef 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -5699,9 +5699,8 @@ SelectionDAGBuilder::lowerInvokable(TargetLowering::CallLoweringInfo &CLI, CLI.setChain(getRoot()); } - - const TargetLowering *TLI = TM.getSubtargetImpl()->getTargetLowering(); - std::pair Result = TLI->LowerCallTo(CLI); + const TargetLowering &TLI = DAG.getTargetLoweringInfo(); + std::pair Result = TLI.LowerCallTo(CLI); assert((CLI.IsTailCall || Result.second.getNode()) && "Non-null chain expected with non-tail call!"); -- 2.7.4