llvm / clangir

A new (MLIR based) high-level IR for clang.
https://clangir.org
Other
312 stars 86 forks source link

[CIR][CIRGen] Support CodeGen for structural bindings #618

Closed PragmaTwice closed 1 month ago

PragmaTwice commented 1 month ago

In this PR I added the support for structural bindings in CIR codegen, to reason DecompositionDecl and BindDecl properly.

Note that since ArrayInitLoopExpr is not implemented so binding to arrays is not supported yet. I'll look into it later : )

PragmaTwice commented 1 month ago

Thank you for your review and extra information!

I've added some LLVM CHECKs to the test file. Feel free to review again : )