[Mlir-commits] [mlir] [mlir][IR] Fix `Block::without_terminator` for blocks without terminator (PR #154498)
Matthias Springer
llvmlistbot at llvm.org
Wed Aug 20 06:10:16 PDT 2025
================
@@ -221,9 +226,15 @@ class alignas(8) Block : public IRObjectWithUseList<BlockOperand>,
/// the block might have a valid terminator operation.
Operation *getTerminator();
- /// Check whether this block might have a terminator.
+ /// Return "true" if this block might have a terminator. Return "true" if
+ /// the last operation is unregistered.
bool mightHaveTerminator();
+ /// Return "true" if this block has a terminator. Return "false" if the last
+ /// operation is unregistered. In that case, the presence of a terminator
+ /// cannot be determined.
+ bool hasTerminator();
----------------
matthias-springer wrote:
So you're saying it would be better to remove `without_terminator`?
https://github.com/llvm/llvm-project/pull/154498
More information about the Mlir-commits
mailing list