llvm-project
f05b705d - [mlir] Fix crash in testNoSkipErasureCallbacks on empty blocks (#183757)

Commit
60 days ago
[mlir] Fix crash in testNoSkipErasureCallbacks on empty blocks (#183757) The `noSkipBlockErasure` callback in `testNoSkipErasureCallbacks` called `block->front().getParentRegion()` to get the parent region of a block. This dereferences the ilist sentinel node when the block has no operations, triggering an assertion failure. Use `block->getParent()` instead, which directly returns the region containing the block without requiring any operations to be present. Fixes #183511
Author
Parents
Loading