[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

Nathan Lanza via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 1 09:59:07 PDT 2024


================
@@ -31,9 +34,14 @@ void CIRGenerator::Initialize(ASTContext &astCtx) {
 
   this->astCtx = &astCtx;
 
-  cgm = std::make_unique<CIRGenModule>(*mlirCtx, astCtx, codeGenOpts, diags);
+  mlirCtx = std::make_unique<mlir::MLIRContext>();
+  mlirCtx->getOrLoadDialect<mlir::cir::CIRDialect>();
----------------
lanza wrote:

There's a `loadDialect` equivalent that we can switch to. 

https://github.com/llvm/llvm-project/pull/113483


More information about the cfe-commits mailing list