[clang] [CIR] Represent Cleanups with Cleanup scopes (PR #180276)

Bruno Cardoso Lopes via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 17 16:07:30 PST 2026


bcardosolopes wrote:

> 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.

This is expected in a lot of scenarios, seems like a legit use.

> %temp_result = cir.alloca !cir.bool, !cir.ptr<!cir.bool>, ["temp"]

Maybe `temp` can be something like `cleanup.scope.tmp`

https://github.com/llvm/llvm-project/pull/180276


More information about the cfe-commits mailing list