mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-12-02 00:29:22 -06:00
Currently the clangir compiler is implemented by a special clang variant whose compilation options list gets appended with `-Xclang -fclangir -Xclang -emit-cir`. This introduces a problem: we no longer gets access to its LLVM IR output and assembly output because `-emit-cir` is an exclusive option. This patch resolves this problem by introducing a new ClangIR pane, similar to the LLVM IR pane or Rust MIR pane. A new output kind named `ClangIR` is added to the "Add new..." drop down menu and it toggles the ClangIR pane. This patch then removes `-Xclang -emit-cir` from the options list of the clangir compiler. The clangir compiler will then output assembly code just like other clang compilers. The removed options will be added back when compiled from the ClangIR pane.