[Mlir-commits] [flang] [mlir] [Flang][OpenMP] Add LLVM translation support for UNTIED clause in Task (PR #121052)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Dec 24 07:48:12 PST 2024


================
@@ -213,6 +213,29 @@ class AssociatedLoopChecker {
   std::map<std::string, std::int64_t> constructNamesAndLevels_;
 };
 
+// `OmpDesignatorChecker` is used to check if the designator
+// can appear within the OpenMP construct
+class OmpDesignatorChecker {
+public:
+  OmpDesignatorChecker(SemanticsContext &context) : context_{context} {}
+
+  template <typename T> bool Pre(const T &) { return true; }
+  template <typename T> void Post(const T &) {}
+
+  bool Pre(const parser::Name &name) {
+    if (name.symbol->test(Symbol::Flag::OmpThreadprivate)) {
+      // OpenMP 5.2: 5.2 threadprivate directive restriction
+      context_.Say(name.source,
+          "A THREADPRIVATE variable `%s` cannot appear in a UNTIED TASK region"_err_en_US,
----------------
NimishMishra wrote:

Minor: "an UNTIED TASK region"

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


More information about the Mlir-commits mailing list