[clang] [CIR] Source LoweringPrepare target facts from the module (PR #219078)

Konstantinos Parasyris via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 11 08:01:21 PDT 2026


================
@@ -3029,6 +3038,9 @@ void LoweringPreparePass::runOnOperation() {
   if (isa<::mlir::ModuleOp>(op))
     mlirModule = cast<::mlir::ModuleOp>(op);
 
+  if (mlirModule)
----------------
koparasy wrote:

It's always a ModuleOp, this pass only runs from the CIRGen pipeline (added at module scope) and isn't registered in cir-opt. Switched the ifs to asserts.

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


More information about the cfe-commits mailing list