diff options
| author | Owen Anderson <resistor@mac.com> | 2009-07-31 17:39:07 +0000 |
|---|---|---|
| committer | Owen Anderson <resistor@mac.com> | 2009-07-31 17:39:07 +0000 |
| commit | 4f720fae677b937ace6ffd2bdbfb670ddbadc663 (patch) | |
| tree | 083068ba3cfc6652b20e6dbe0dbcfe207cc00f6e /lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | |
| parent | 3ab1fdf291804b5e9adf548db6ee6df63114ed20 (diff) | |
| download | external_llvm-4f720fae677b937ace6ffd2bdbfb670ddbadc663.zip external_llvm-4f720fae677b937ace6ffd2bdbfb670ddbadc663.tar.gz external_llvm-4f720fae677b937ace6ffd2bdbfb670ddbadc663.tar.bz2 | |
Move getTrue() and getFalse() to 2.5-like APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77685 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp')
| -rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp index 0eda58a..43761e1 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp @@ -1149,7 +1149,7 @@ SelectionDAGLowering::EmitBranchForMergedCondition(Value *Cond, } // Create a CaseBlock record representing this branch. - CaseBlock CB(ISD::SETEQ, Cond, DAG.getContext()->getTrue(), + CaseBlock CB(ISD::SETEQ, Cond, ConstantInt::getTrue(*DAG.getContext()), NULL, TBB, FBB, CurBB); SwitchCases.push_back(CB); } @@ -1304,7 +1304,7 @@ void SelectionDAGLowering::visitBr(BranchInst &I) { } // Create a CaseBlock record representing this branch. - CaseBlock CB(ISD::SETEQ, CondVal, DAG.getContext()->getTrue(), + CaseBlock CB(ISD::SETEQ, CondVal, ConstantInt::getTrue(*DAG.getContext()), NULL, Succ0MBB, Succ1MBB, CurMBB); // Use visitSwitchCase to actually insert the fast branch sequence for this // cond branch. @@ -1322,10 +1322,10 @@ void SelectionDAGLowering::visitSwitchCase(CaseBlock &CB) { if (CB.CmpMHS == NULL) { // Fold "(X == true)" to X and "(X == false)" to !X to // handle common cases produced by branch lowering. - if (CB.CmpRHS == DAG.getContext()->getTrue() && + if (CB.CmpRHS == ConstantInt::getTrue(*DAG.getContext()) && CB.CC == ISD::SETEQ) Cond = CondLHS; - else if (CB.CmpRHS == DAG.getContext()->getFalse() && + else if (CB.CmpRHS == ConstantInt::getFalse(*DAG.getContext()) && CB.CC == ISD::SETEQ) { SDValue True = DAG.getConstant(1, CondLHS.getValueType()); Cond = DAG.getNode(ISD::XOR, dl, CondLHS.getValueType(), CondLHS, True); |
