[NFC][AssemblyWriter] Allow AssemblyWriter::printBasicBlock() to print blocks that...
authorAditya Nandakumar <aditya_nandakumar@apple.com>
Tue, 20 Jul 2021 22:44:59 +0000 (15:44 -0700)
committerAditya Nandakumar <aditya_nandakumar@apple.com>
Tue, 20 Jul 2021 22:46:31 +0000 (15:46 -0700)
commitfbd3bb4365e145a5033fdeea0ede978304d22d68
tree144a24f5af018cf37ecba70e11af5d86c043dc14
parentf6769b663a0d4432b5e00e0c03904a5dfba7b077
[NFC][AssemblyWriter] Allow AssemblyWriter::printBasicBlock() to print blocks that don't have parents.

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.

Committing for xiaoqing_wu

https://reviews.llvm.org/D106127k
llvm/lib/IR/AsmWriter.cpp