[flang-commits] [flang] 1023990 - [flang][OpenMP] Rename check-omp-metadirective.cpp (NFC). (#201159)

via flang-commits flang-commits at lists.llvm.org
Wed Jun 3 02:34:13 PDT 2026


Author: Abid Qadeer
Date: 2026-06-03T10:34:09+01:00
New Revision: 1023990a57d5824a6fc2f7a899b8f36977bbcf66

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

LOG: [flang][OpenMP] Rename check-omp-metadirective.cpp (NFC). (#201159)

Both METADIRECTIVE and DECLARE VARIANT fall into the "variant
directives" category, so check-omp-variant.cpp is a more accurate name
for the file that hosts their semantic checks.

Suggested in
https://github.com/llvm/llvm-project/pull/198799#issuecomment-4576970335

Added: 
    flang/lib/Semantics/check-omp-variant.cpp

Modified: 
    flang/lib/Semantics/CMakeLists.txt
    flang/lib/Semantics/check-omp-structure.h

Removed: 
    flang/lib/Semantics/check-omp-metadirective.cpp


################################################################################
diff  --git a/flang/lib/Semantics/CMakeLists.txt b/flang/lib/Semantics/CMakeLists.txt
index 44e6dfb4dd09f..efe3c5fa875dc 100644
--- a/flang/lib/Semantics/CMakeLists.txt
+++ b/flang/lib/Semantics/CMakeLists.txt
@@ -22,7 +22,7 @@ add_flang_library(FortranSemantics
   check-nullify.cpp
   check-omp-atomic.cpp
   check-omp-loop.cpp
-  check-omp-metadirective.cpp
+  check-omp-variant.cpp
   check-omp-structure.cpp
   check-purity.cpp
   check-return.cpp

diff  --git a/flang/lib/Semantics/check-omp-structure.h b/flang/lib/Semantics/check-omp-structure.h
index 676442d0bd666..6e693fa7b8e48 100644
--- a/flang/lib/Semantics/check-omp-structure.h
+++ b/flang/lib/Semantics/check-omp-structure.h
@@ -258,7 +258,7 @@ class OmpStructureChecker : public OmpStructureCheckerBase {
   void CheckScanModifier(const parser::OmpClause::Reduction &x);
   void CheckDistLinear(const parser::OpenMPLoopConstruct &x);
 
-  // check-omp-metadirective.cpp
+  // check-omp-variant.cpp
   void CheckOmpDeclareVariantDirective(
       const parser::OmpDeclareVariantDirective &);
   void CheckDeclareVariantUserConditions(const parser::OmpContextSelector &);

diff  --git a/flang/lib/Semantics/check-omp-metadirective.cpp b/flang/lib/Semantics/check-omp-variant.cpp
similarity index 99%
rename from flang/lib/Semantics/check-omp-metadirective.cpp
rename to flang/lib/Semantics/check-omp-variant.cpp
index d492f7e7e2eb4..8ab160496b64a 100644
--- a/flang/lib/Semantics/check-omp-metadirective.cpp
+++ b/flang/lib/Semantics/check-omp-variant.cpp
@@ -1,4 +1,4 @@
-//===-- lib/Semantics/check-omp-metadirective.cpp -------------------------===//
+//===-- lib/Semantics/check-omp-variant.cpp -------------------------------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.


        


More information about the flang-commits mailing list