================
@@ -2900,7 +2900,7 @@ defm clangir : BoolFOption<"clangir",
   PosFlag<SetTrue, [], [ClangOption, CC1Option], "Use the ClangIR pipeline to 
compile">,
   NegFlag<SetFalse, [], [ClangOption, CC1Option], "Use the AST -> LLVM 
pipeline to compile">,
   BothFlags<[], [ClangOption, CC1Option], "">>;
-def emit_cir : Flag<["-"], "emit-cir">, Visibility<[CC1Option]>,
+def emit_cir : Flag<["-"], "emit-cir">, Visibility<[ClangOption, CC1Option]>,
----------------
MaskRay wrote:

> Notably, -emit-llvm-bc does the wrong thing in all cases. clang -Xclang 
> -emit-llvm-bc hello.c does the wrong thing and emits an executable. clang 
> -Xclang -emit-llvm -S hello.c also does the wrong thing and emits a file 
> named hello.s that is actually llvm bitcode.

The description of #91140 might be useful.

You need `-S` or `-c` to disable linking. Then `-c -Xclang -emit-cir` can be 
used to override the assumed action passed by clangDriver to cc1.

https://github.com/llvm/llvm-project/pull/91007
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to