Fix for invalid jump table basic block

This commit is contained in:
Paweł Bylica 2014-10-17 13:12:36 +02:00
parent 0febd6ae1a
commit de8deab6ff

View file

@ -927,6 +927,13 @@ void Compiler::linkBasicBlocks()
completePhiNodes(*it); completePhiNodes(*it);
} }
} }
// Remove jump table block if not predecessors
if (llvm::pred_begin(m_jumpTableBlock->llvm()) == llvm::pred_end(m_jumpTableBlock->llvm()))
{
m_jumpTableBlock->llvm()->eraseFromParent();
m_jumpTableBlock.reset();
}
} }
void Compiler::dumpBasicBlockGraph(std::ostream& out) void Compiler::dumpBasicBlockGraph(std::ostream& out)