[all-commits] [llvm/llvm-project] d071e4: [CIR] Fix eraseOp assertion in TryOp flattening wi...
adams381 via All-commits
all-commits at lists.llvm.org
Mon Apr 27 09:40:19 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d071e4b765dfadc1472b97d09f5014c92ab27ead
https://github.com/llvm/llvm-project/commit/d071e4b765dfadc1472b97d09f5014c92ab27ead
Author: adams381 <adams at nvidia.com>
Date: 2026-04-27 (Mon, 27 Apr 2026)
Changed paths:
M clang/lib/CIR/Dialect/Transforms/FlattenCFG.cpp
A clang/test/CIR/CodeGen/try-no-throwing-calls.cpp
Log Message:
-----------
[CIR] Fix eraseOp assertion in TryOp flattening with unreachable handlers (#193615)
When a try block has catch handlers but no throwing calls, the handler
regions are unreachable and the TryOp is erased. However, ops inside the
handler regions may reference values that were inlined from the try body
into the parent block, causing an assertion in `eraseOp` ("expected that
op has no uses").
This drops all defined value uses from handler regions before erasing
the TryOp.
Made with [Cursor](https://cursor.com)
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list