[flang-commits] [flang] f3cce97 - [flang][OpenMP] Remove directive-specific code from GetOmpDirectiveNa… (#170157)

via flang-commits flang-commits at lists.llvm.org
Mon Dec 1 08:43:49 PST 2025


Author: Krzysztof Parzyszek
Date: 2025-12-01T10:43:45-06:00
New Revision: f3cce97ba79ee507adfe4069ba907dcc842def31

URL: https://github.com/llvm/llvm-project/commit/f3cce97ba79ee507adfe4069ba907dcc842def31
DIFF: https://github.com/llvm/llvm-project/commit/f3cce97ba79ee507adfe4069ba907dcc842def31.diff

LOG: [flang][OpenMP] Remove directive-specific code from GetOmpDirectiveNa… (#170157)

…me, NFC

It is unnecessary, existing overloads handle these cases already.

Added: 
    

Modified: 
    flang/include/flang/Parser/openmp-utils.h

Removed: 
    


################################################################################
diff  --git a/flang/include/flang/Parser/openmp-utils.h b/flang/include/flang/Parser/openmp-utils.h
index b72164e6cef4b..b7d990c9e75d6 100644
--- a/flang/include/flang/Parser/openmp-utils.h
+++ b/flang/include/flang/Parser/openmp-utils.h
@@ -67,17 +67,7 @@ struct DirectiveNameScope {
   template <typename T>
   static OmpDirectiveName GetOmpDirectiveName(const T &x) {
     if constexpr (WrapperTrait<T>) {
-      if constexpr (std::is_same_v<T, OpenMPCancelConstruct> ||
-          std::is_same_v<T, OpenMPCancellationPointConstruct> ||
-          std::is_same_v<T, OpenMPDepobjConstruct> ||
-          std::is_same_v<T, OpenMPFlushConstruct> ||
-          std::is_same_v<T, OpenMPInteropConstruct> ||
-          std::is_same_v<T, OpenMPSimpleStandaloneConstruct> ||
-          std::is_same_v<T, OpenMPGroupprivate>) {
-        return x.v.DirName();
-      } else {
-        return GetOmpDirectiveName(x.v);
-      }
+      return GetOmpDirectiveName(x.v);
     } else if constexpr (TupleTrait<T>) {
       if constexpr (std::is_base_of_v<OmpBlockConstruct, T>) {
         return std::get<OmpBeginDirective>(x.t).DirName();


        


More information about the flang-commits mailing list