diff options
author | Zhou Sheng <zhousheng00@gmail.com> | 2007-01-11 12:24:14 +0000 |
---|---|---|
committer | Zhou Sheng <zhousheng00@gmail.com> | 2007-01-11 12:24:14 +0000 |
commit | 6b6b6ef1677fa71b1072c2911b4c1f9524a558c9 (patch) | |
tree | 480ecf010ac5facd1bc29ab57441253691bb42d6 /lib/Transforms/Utils/Local.cpp | |
parent | 057809ac1c78c3456e8f1481330fa2bcd2b85029 (diff) |
For PR1043:
Merge ConstantIntegral and ConstantBool into ConstantInt.
Remove ConstantIntegral and ConstantBool from LLVM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33073 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/Local.cpp')
-rw-r--r-- | lib/Transforms/Utils/Local.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms/Utils/Local.cpp b/lib/Transforms/Utils/Local.cpp index 236ec4b8be..f3d6ca85cc 100644 --- a/lib/Transforms/Utils/Local.cpp +++ b/lib/Transforms/Utils/Local.cpp @@ -173,11 +173,11 @@ bool llvm::ConstantFoldTerminator(BasicBlock *BB) { BasicBlock *Dest1 = cast<BasicBlock>(BI->getOperand(0)); BasicBlock *Dest2 = cast<BasicBlock>(BI->getOperand(1)); - if (ConstantBool *Cond = dyn_cast<ConstantBool>(BI->getCondition())) { + if (ConstantInt *Cond = dyn_cast<ConstantInt>(BI->getCondition())) { // Are we branching on constant? // YES. Change to unconditional branch... - BasicBlock *Destination = Cond->getValue() ? Dest1 : Dest2; - BasicBlock *OldDest = Cond->getValue() ? Dest2 : Dest1; + BasicBlock *Destination = Cond->getBoolValue() ? Dest1 : Dest2; + BasicBlock *OldDest = Cond->getBoolValue() ? Dest2 : Dest1; //cerr << "Function: " << T->getParent()->getParent() // << "\nRemoving branch from " << T->getParent() |