[all-commits] [llvm/llvm-project] fbd3bb: [NFC][AssemblyWriter] Allow AssemblyWriter::printB...

proaditya via All-commits all-commits at lists.llvm.org
Tue Jul 20 15:47:26 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fbd3bb4365e145a5033fdeea0ede978304d22d68
      https://github.com/llvm/llvm-project/commit/fbd3bb4365e145a5033fdeea0ede978304d22d68
  Author: Aditya Nandakumar <aditya_nandakumar at apple.com>
  Date:   2021-07-20 (Tue, 20 Jul 2021)

  Changed paths:
    M llvm/lib/IR/AsmWriter.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list