[clang] [CIR] Don't pass -fclangir to LLVM-IR files (PR #187729)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 20 09:33:23 PDT 2026
================
@@ -5080,7 +5080,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
}
}
- if (Args.hasArg(options::OPT_fclangir))
+ if (Args.hasArg(options::OPT_fclangir) && !types::isLLVMIR(Input.getType()))
----------------
andykaylor wrote:
I don't like that this silently ignores the flag for this input type. Obviously, we don't want to try to push LLVM IR files through the CIR path, but this feels like it should be an error. I'm guessing this is a problem with having multiple inputs, some of which you do want to go through CIR? If this command is coming from the driver (such as for a multi-stage compilation) can you fix the driver to not do this?
https://github.com/llvm/llvm-project/pull/187729
More information about the cfe-commits
mailing list