[clang] [CIR] Represent Cleanups with Cleanup scopes (PR #180276)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 18 14:07:44 PST 2026
andykaylor wrote:
> This is the current CIR generated when CleanupScope is used inside a ternary
> I am thinking to create a temp alloca to store the result of the call and load it after cleanup to use it in the yield of the ternary.
>
> What do you think? @andykaylor
Can you detect, in a general way, all values that are created in a cleanup scope but referenced outside the scope? A temporary variable seems like a reasonable solution, as long as the implementation is clean and flexible.
https://github.com/llvm/llvm-project/pull/180276
More information about the cfe-commits
mailing list