================ @@ -55,15 +55,19 @@ class MapsForPrivatizedSymbolsPass std::underlying_type_t<llvm::omp::OpenMPOffloadMappingFlags>>( llvm::omp::OpenMPOffloadMappingFlags::OMP_MAP_TO); Operation *definingOp = var.getDefiningOp(); - auto declOp = llvm::dyn_cast_or_null<hlfir::DeclareOp>(definingOp); - assert(declOp && - "Expected defining Op of privatized var to be hlfir.declare"); + assert(definingOp && + "Privatizing a block argument without any hlfir.declare"); ---------------- ergawy wrote:
> MLIR values can come from two places: That's exactly my point. What prevents us from working with block args here? Why do we need to assume it is defined by an op? I am not against that, we can keep the assertion. But beyond the fact that we need to call `getBase` below, we only care about `var` and a `Value` and not about its defining op. https://github.com/llvm/llvm-project/pull/124019 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits