[PATCH] D106127: [NFC][AssemblyWriter]Allow AssemblyWriter::printBasicBlock() to print blocks that don't have parents.
Xiaoqing Wu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 20 14:01:43 PDT 2021
xiaoqing_wu marked an inline comment as done.
xiaoqing_wu added inline comments.
================
Comment at: llvm/lib/IR/AsmWriter.cpp:3849
void AssemblyWriter::printBasicBlock(const BasicBlock *BB) {
- assert(BB && BB->getParent() && "block without parent!");
bool IsEntryBlock = BB->isEntryBlock();
if (BB->hasName()) { // Print out the label if it exists...
----------------
jyknight wrote:
> I'd suggest to make this be:
> `bool IsEntryBlock = BB->getParent() && BB->isEntryBlock();`
> instead of modifying isEntryBlock.
Thanks for the suggestion.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106127/new/
https://reviews.llvm.org/D106127
More information about the llvm-commits
mailing list