Remove the assert in AssemblyWriter::printBasicBlock() and in BasicBlock::isEntryBlock() that require blocks to have parents. Instead, have BasicBlock::isEntryBlock() return false for unattached blocks. This allows us to call these functions for blocks that are not yet added to a module which is a useful debugging capability.
Diff Detail
Diff Detail
Unit Tests
Unit Tests
I'd suggest to make this be:
bool IsEntryBlock = BB->getParent() && BB->isEntryBlock();
instead of modifying isEntryBlock.