================
@@ -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; }
----------------
AaronBallman wrote:

Yes, that sounds like a good path forward. FWIW, I think it's reasonable for 
CIR to have *some* ugly `const_cast` uses to hide the lack of const correctness 
from Clang, but not to an obnoxious amount (which it sounds like would be the 
case with MLIR operations or values). Thanks!

https://github.com/llvm/llvm-project/pull/127835
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to