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 | 75b871fb1ecb121f84612864d97e79d90930232c (patch) | |
tree | af683c54f708c4ed3c49607a754c744fb1b1932d /llvm/lib/Transforms/Utils/Local.cpp | |
parent | 691b263e07d48c6a34eed2f0dd6e8150ff51a286 (diff) | |
download | bcm5719-llvm-75b871fb1ecb121f84612864d97e79d90930232c.tar.gz bcm5719-llvm-75b871fb1ecb121f84612864d97e79d90930232c.zip |
For PR1043:
Merge ConstantIntegral and ConstantBool into ConstantInt.
Remove ConstantIntegral and ConstantBool from LLVM.
llvm-svn: 33073
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/Local.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index 236ec4b8bea..f3d6ca85ccf 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/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() |