diff options
author | Justin Stitt <justinstitt@google.com> | 2025-09-17 14:33:44 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-17 14:33:44 -0700 |
commit | 6af5b41e4b4e303589ff709efaf783828dc3f75a (patch) | |
tree | c36feb6f4d7c375614bdc5b5574d581500a0ce29 /clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp | |
parent | 7cc5989593711ea4d6b5e13879b2ec3ba9a88171 (diff) | |
download | llvm-6af5b41e4b4e303589ff709efaf783828dc3f75a.zip llvm-6af5b41e4b4e303589ff709efaf783828dc3f75a.tar.gz llvm-6af5b41e4b4e303589ff709efaf783828dc3f75a.tar.bz2 |
[CIR] Change unreachable to diagnostic for ill-equipped clang (#152614)
Diffstat (limited to 'clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp')
-rw-r--r-- | clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp index 8b0ab2e..1621242 100644 --- a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp +++ b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp @@ -81,7 +81,8 @@ CreateFrontendBaseAction(CompilerInstance &CI) { #if CLANG_ENABLE_CIR return std::make_unique<cir::EmitCIRAction>(); #else - llvm_unreachable("CIR suppport not built into clang"); + CI.getDiagnostics().Report(diag::err_fe_cir_not_built); + return nullptr; #endif case EmitHTML: return std::make_unique<HTMLPrintAction>(); case EmitLLVM: { |