[clang] [CIR] Defer indirect goto resolution to GotoSolver (PR #206176)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Jun 28 11:57:54 PDT 2026
================
@@ -706,13 +706,22 @@ mlir::LogicalResult CIRGenFunction::emitGotoStmt(const clang::GotoStmt &s) {
mlir::LogicalResult
CIRGenFunction::emitIndirectGotoStmt(const IndirectGotoStmt &s) {
+ // An indirect goto that branches out of a scope needing cleanup (a VLA stack
----------------
Andres-Salamanca wrote:
In Classic CodeGen, if it detects
```cpp
if (const LabelDecl *Target = S.getConstantTarget()) {
```
it emits an EmitBranchThroughCleanup() directly to the target label. Should we support the same case here as well?
Also, related to cleanups, I think we should add support for GotoIndirectOp in `CIRCleanupScopeOpFlattening::collectExits()` so indirect gotos are also collected when leaving a cleanup scope. @andykaylor, please correct me if I'm missing something here
https://github.com/llvm/llvm-project/pull/206176
More information about the cfe-commits
mailing list