llvm / clangir

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

[CIR[CIRGen][NFC] Refactor build switch op #552

Closed wenpen closed 3 months ago

wenpen commented 4 months ago

Make logic cleaner and more extensible.

Separate collecting SwitchStmt information and building op logic into different functions. Add more UT to cover nested switch, which also worked before this pr.

This pr is split from #528.