mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
Add support for new style casts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@694 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -85,8 +85,8 @@ bool opt::ConstantFoldTerminator(TerminatorInst *T) {
|
||||
if (T->getOpcode() == Instruction::Br) {
|
||||
BranchInst *BI = (BranchInst*)T;
|
||||
if (BI->isUnconditional()) return false; // Can't optimize uncond branch
|
||||
BasicBlock *Dest1 = BI->getOperand(0)->castBasicBlockAsserting();
|
||||
BasicBlock *Dest2 = BI->getOperand(1)->castBasicBlockAsserting();
|
||||
BasicBlock *Dest1 = cast<BasicBlock>(BI->getOperand(0));
|
||||
BasicBlock *Dest2 = cast<BasicBlock>(BI->getOperand(1));
|
||||
|
||||
if (BI->getCondition()->isConstant()) { // Are we branching on constant?
|
||||
// YES. Change to unconditional branch...
|
||||
|
||||
Reference in New Issue
Block a user