[clang] [CIR] Initial implementation of lowering CIR to MLIR (PR #127835)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 20 11:17:37 PST 2025


================
@@ -55,6 +55,7 @@ class CIRGenerator : public clang::ASTConsumer {
   void Initialize(clang::ASTContext &astContext) override;
   bool HandleTopLevelDecl(clang::DeclGroupRef group) override;
   mlir::ModuleOp getModule() const;
+  mlir::MLIRContext &getMLIRContext() { return *mlirContext; }
----------------
andykaylor wrote:

OK, so to stay consistent with the MLIR design philosophy, we won't use const with MLIR operations or values, but we should be moving everything else to const-correctness as it is upstreamed. Does that sound reasonable?

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


More information about the cfe-commits mailing list