mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Don't crash if we are printing an orphaned basic block!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10100 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8b1daa3e71
commit
4e4d8624c5
@ -751,6 +751,9 @@ void AssemblyWriter::printBasicBlock(const BasicBlock *BB) {
|
||||
Out << "<badref>";
|
||||
}
|
||||
|
||||
if (BB->getParent() == 0)
|
||||
Out << "\t\t; Error: Block without parent!";
|
||||
else {
|
||||
if (BB != &BB->getParent()->front()) { // Not the entry block?
|
||||
// Output predecessors for the block...
|
||||
Out << "\t\t;";
|
||||
@ -767,6 +770,7 @@ void AssemblyWriter::printBasicBlock(const BasicBlock *BB) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Out << "\n";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user