[clang] [CIR] Add framework for CIR to LLVM IR lowering (PR #124650)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 28 11:34:29 PST 2025
================
@@ -55,6 +56,13 @@ class EmitCIRAction : public CIRGenAction {
EmitCIRAction(mlir::MLIRContext *MLIRCtx = nullptr);
};
+class EmitLLVMAction : public CIRGenAction {
+ virtual void anchor();
+
+public:
+ EmitLLVMAction(mlir::MLIRContext *MLIRCtx = nullptr);
----------------
andykaylor wrote:
This seems to be following a pattern established by CodeGenAction, and calling this without a context parameter is the normal case (in fact, it's the only case I see in the code). When the parameter is null, the CIRGenAction constructor allocates a new context. If a non-null pointer is passed, the constructor just uses it.
https://github.com/llvm/llvm-project/pull/124650
More information about the cfe-commits
mailing list