[flang-commits] [flang] [mlir] [Flang][MLIR][OpenMP] Allow setting OMP_MAP_PTR_AND_OBJ by frontends (PR #84328)

Krzysztof Parzyszek via flang-commits flang-commits at lists.llvm.org
Thu Mar 7 10:48:37 PST 2024


================
@@ -34,6 +34,22 @@ namespace Fortran {
 namespace lower {
 namespace omp {
 
+void checkAndApplyDeclTargetMapFlags(
+    Fortran::lower::AbstractConverter &converter,
+    llvm::omp::OpenMPOffloadMappingFlags &mapFlags,
+    const Fortran::semantics::Symbol &symbol) {
+  if (auto declareTargetOp =
+          llvm::dyn_cast_if_present<mlir::omp::DeclareTargetInterface>(
+              converter.getModuleOp().lookupSymbol(
+                  converter.mangleName(symbol)))) {
----------------
kparzysz wrote:

In such cases use your best judgment.  IMO this looks horrible, but I'll respect your choice.  :)
Just respond with what you prefer.


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


More information about the flang-commits mailing list