Skip to content

Commit

Permalink
Grab the TargetLowering info from the DAG rather than querying for
Browse files Browse the repository at this point in the history
a subtarget.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227156 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
echristo committed Jan 27, 2015
1 parent 28f4510 commit cdafa10
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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!");
Expand Down

0 comments on commit cdafa10

Please sign in to comment.