================
@@ -0,0 +1,50 @@
+//===-- Coarray.h -- generate Coarray intrinsics runtime calls --*- C++ 
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef FORTRAN_OPTIMIZER_BUILDER_RUNTIME_COARRAY_H
+#define FORTRAN_OPTIMIZER_BUILDER_RUNTIME_COARRAY_H
+
+#include "flang/Lower/AbstractConverter.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
+
+namespace fir {
+class ExtendedValue;
+class FirOpBuilder;
+} // namespace fir
+
+namespace fir::runtime {
+
+// Get the function type for a prif subroutine with a variable number of
+// arguments
+#define PRIF_FUNCTYPE(...)                                                     
\
+  mlir::FunctionType::get(builder.getContext(), /*inputs*/ {__VA_ARGS__},      
\
+                          /*result*/ {})
+
+// Default prefix for type of PRIF compiled with LLVM
+#define PRIFTYPE_PREFIX "_QM__prifT"
+#define PRIFTYPE(fmt)                                                          
\
+  []() {                                                                       
\
+    std::ostringstream oss;                                                    
\
+    oss << PRIFTYPE_PREFIX << fmt;                                             
\
+    return oss.str();                                                          
\
+  }()
+
+// Default prefix for subroutines of PRIF compiled with LLVM
+#define PRIFSUB_PREFIX "_QMprifPprif_"
+#define PRIFNAME_SUB(fmt)                                                      
\
+  []() {                                                                       
\
+    std::ostringstream oss;                                                    
\
+    oss << PRIFSUB_PREFIX << fmt;                                              
\
+    return oss.str();                                                          
\
----------------
clementval wrote:

You can use functions in `flang/lib/Optimizer/Support/InternalNames.cpp` so the 
mangled name is kept up to date in case of changes. 

https://github.com/llvm/llvm-project/pull/151675
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [clang] [... Katherine Rasmussen via cfe-commits
    • [cla... Valentin Clement バレンタイン クレメン via cfe-commits
    • [cla... Valentin Clement バレンタイン クレメン via cfe-commits
    • [cla... Katherine Rasmussen via cfe-commits
    • [cla... Jean-Didier PAILLEUX via cfe-commits
    • [cla... Jean-Didier PAILLEUX via cfe-commits
    • [cla... Jean-Didier PAILLEUX via cfe-commits
    • [cla... Katherine Rasmussen via cfe-commits
    • [cla... Katherine Rasmussen via cfe-commits
    • [cla... LLVM Continuous Integration via cfe-commits
    • [cla... LLVM Continuous Integration via cfe-commits

Reply via email to