Grab the TargetLowering info from the DAG rather than querying for
authorEric Christopher <echristo@gmail.com>
Tue, 27 Jan 2015 01:01:36 +0000 (01:01 +0000)
committerEric Christopher <echristo@gmail.com>
Tue, 27 Jan 2015 01:01:36 +0000 (01:01 +0000)
a subtarget.

llvm-svn: 227156

llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

index cb58e13..df0c4ef 100644 (file)
@@ -5699,9 +5699,8 @@ SelectionDAGBuilder::lowerInvokable(TargetLowering::CallLoweringInfo &CLI,
 
     CLI.setChain(getRoot());
   }
-
-  const TargetLowering *TLI = TM.getSubtargetImpl()->getTargetLowering();
-  std::pair<SDValue, SDValue> Result = TLI->LowerCallTo(CLI);
+  const TargetLowering &TLI = DAG.getTargetLoweringInfo();
+  std::pair<SDValue, SDValue> Result = TLI.LowerCallTo(CLI);
 
   assert((CLI.IsTailCall || Result.second.getNode()) &&
          "Non-null chain expected with non-tail call!");