aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-31 17:39:07 +0000
committerOwen Anderson <resistor@mac.com>2009-07-31 17:39:07 +0000
commit5defacc6e605f4651c6300237cef8e9bb2eb6d0e (patch)
tree083068ba3cfc6652b20e6dbe0dbcfe207cc00f6e /lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
parented47a0409b187d5dcd2bddfd054326fc809d00ae (diff)
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.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
index 0eda58ade4..43761e1906 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);