[all-commits] [llvm/llvm-project] e223cb: [CIR] Implement constructor 'try-body' lowering (#...
Erich Keane via All-commits
all-commits at lists.llvm.org
Tue Apr 7 06:35:34 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e223cbd2fc24f25830bee023044f32d144f3a5b2
https://github.com/llvm/llvm-project/commit/e223cbd2fc24f25830bee023044f32d144f3a5b2
Author: Erich Keane <ekeane at nvidia.com>
Date: 2026-04-07 (Tue, 07 Apr 2026)
Changed paths:
M clang/lib/CIR/CodeGen/CIRGenException.cpp
M clang/lib/CIR/CodeGen/CIRGenFunction.cpp
M clang/lib/CIR/CodeGen/CIRGenFunction.h
A clang/test/CIR/CodeGen/ctor-try-body.cpp
Log Message:
-----------
[CIR] Implement constructor 'try-body' lowering (#190613)
C++ supports the ability to have the 'body' of a constructor be a 'try'
block. The effect of this is that base construction and initializers are
also within the same try/catch chain. This patch implements this
lowering.
Classic codegen does this by just emitting the 'begin' and 'end' try as
their own functions, then can emit the body separately between calls.
However, CIR doesn't really afford us that ability, so this patch
extracts a function that takes a callback object that is used to emit
the function body. This allows us to do a simple 'emitStmt' in the
normal cases, plus a `emitCtorPrologue` followed by `emitStmt` in the
try-body case.
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