aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
diff options
context:
space:
mode:
authorAndy Kaylor <akaylor@nvidia.com>2025-01-30 13:11:25 -0800
committerGitHub <noreply@github.com>2025-01-30 13:11:25 -0800
commit38ddcb7e3639438dd925229bbbfb20fbcfb23f7f (patch)
tree6dbaac32d3d5e50410f67bb29366f236914eb73c /clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
parentfdfd97959e91af46fc8b35cb07208db26ccf75e7 (diff)
downloadllvm-38ddcb7e3639438dd925229bbbfb20fbcfb23f7f.zip
llvm-38ddcb7e3639438dd925229bbbfb20fbcfb23f7f.tar.gz
llvm-38ddcb7e3639438dd925229bbbfb20fbcfb23f7f.tar.bz2
[CIR] Add framework for CIR to LLVM IR lowering (#124650)
Create the skeleton framework for lowering from ClangIR to LLVM IR. This initial implementation just creates an empty LLVM IR module. Actual lowering of even minimal ClangIR is deferred to a later patch.
Diffstat (limited to 'clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp')
-rw-r--r--clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
index 079bcd9..c8d0041 100644
--- a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
+++ b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
@@ -71,7 +71,13 @@ CreateFrontendBaseAction(CompilerInstance &CI) {
llvm_unreachable("CIR suppport not built into clang");
#endif
case EmitHTML: return std::make_unique<HTMLPrintAction>();
- case EmitLLVM: return std::make_unique<EmitLLVMAction>();
+ case EmitLLVM: {
+#if CLANG_ENABLE_CIR
+ if (UseCIR)
+ return std::make_unique<cir::EmitLLVMAction>();
+#endif
+ return std::make_unique<EmitLLVMAction>();
+ }
case EmitLLVMOnly: return std::make_unique<EmitLLVMOnlyAction>();
case EmitCodeGenOnly: return std::make_unique<EmitCodeGenOnlyAction>();
case EmitObj: return std::make_unique<EmitObjAction>();