[flang-commits] [flang] [flang][openmp]Add UserReductionDetails and use in DECLARE REDUCTION (PR #140066)

Kiran Chandramohan via flang-commits flang-commits at lists.llvm.org
Fri Jun 6 09:05:06 PDT 2025


================
@@ -1043,6 +1044,28 @@ void ModFileWriter::PutTypeParam(llvm::raw_ostream &os, const Symbol &symbol) {
   os << '\n';
 }
 
+void ModFileWriter::PutUserReduction(
+    llvm::raw_ostream &os, const Symbol &symbol) {
+  const auto &details{symbol.get<UserReductionDetails>()};
+  // The module content for a OpenMP Declare Reduction is the OpenMP
+  // declaration. There may be multiple declarations.
+  // Decls are pointers, so do not use a referene.
----------------
kiranchandramohan wrote:

```suggestion
  // Decls are pointers, so do not use a reference.
```

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


More information about the flang-commits mailing list