From 6b6b6ef1677fa71b1072c2911b4c1f9524a558c9 Mon Sep 17 00:00:00 2001 From: Zhou Sheng Date: Thu, 11 Jan 2007 12:24:14 +0000 Subject: 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 --- lib/Transforms/Utils/Local.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/Transforms/Utils/Local.cpp') 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(BI->getOperand(0)); BasicBlock *Dest2 = cast(BI->getOperand(1)); - if (ConstantBool *Cond = dyn_cast(BI->getCondition())) { + if (ConstantInt *Cond = dyn_cast(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() -- cgit v1.2.3-18-g5258