[flang-commits] [flang] 141ebdd - [Frontend][OpenMP] introduce OMP.h header file, use it instead of OMP… (#84188)
via flang-commits
flang-commits at lists.llvm.org
Fri Mar 8 05:21:46 PST 2024
Author: Krzysztof Parzyszek
Date: 2024-03-08T07:21:42-06:00
New Revision: 141ebdd242f35bfebc576c51d8b60182ae4eac2d
URL: https://github.com/llvm/llvm-project/commit/141ebdd242f35bfebc576c51d8b60182ae4eac2d
DIFF: https://github.com/llvm/llvm-project/commit/141ebdd242f35bfebc576c51d8b60182ae4eac2d.diff
LOG: [Frontend][OpenMP] introduce OMP.h header file, use it instead of OMP… (#84188)
….h.inc
The consumers of OpenMP-related definitions include a TableGen-generated
file OMP.h.inc. Having a separate OMP.h allows putting additional
declarations in there that are not auto-generated.
This patch is NFC.
Added:
llvm/include/llvm/Frontend/OpenMP/OMP.h
Modified:
flang/lib/Semantics/rewrite-directives.cpp
llvm/include/llvm/Frontend/OpenMP/OMPConstants.h
llvm/lib/Frontend/OpenMP/OMP.cpp
Removed:
################################################################################
diff --git a/flang/lib/Semantics/rewrite-directives.cpp b/flang/lib/Semantics/rewrite-directives.cpp
index bab91d25308225..2c3c87f2546a35 100644
--- a/flang/lib/Semantics/rewrite-directives.cpp
+++ b/flang/lib/Semantics/rewrite-directives.cpp
@@ -11,7 +11,7 @@
#include "flang/Parser/parse-tree.h"
#include "flang/Semantics/semantics.h"
#include "flang/Semantics/symbol.h"
-#include "llvm/Frontend/OpenMP/OMP.h.inc"
+#include "llvm/Frontend/OpenMP/OMP.h"
#include <list>
namespace Fortran::semantics {
diff --git a/llvm/include/llvm/Frontend/OpenMP/OMP.h b/llvm/include/llvm/Frontend/OpenMP/OMP.h
new file mode 100644
index 00000000000000..a85cd9d344c6d7
--- /dev/null
+++ b/llvm/include/llvm/Frontend/OpenMP/OMP.h
@@ -0,0 +1,18 @@
+//===-- OMP.h - Core OpenMP definitions and declarations ---------- 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
+//
+//===----------------------------------------------------------------------===//
+//
+// This file contains the core set of OpenMP definitions and declarations.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_FRONTEND_OPENMP_OMP_H
+#define LLVM_FRONTEND_OPENMP_OMP_H
+
+#include "llvm/Frontend/OpenMP/OMP.h.inc"
+
+#endif // LLVM_FRONTEND_OPENMP_OMP_H
diff --git a/llvm/include/llvm/Frontend/OpenMP/OMPConstants.h b/llvm/include/llvm/Frontend/OpenMP/OMPConstants.h
index f8812e7955b82d..1bfaf3718552e5 100644
--- a/llvm/include/llvm/Frontend/OpenMP/OMPConstants.h
+++ b/llvm/include/llvm/Frontend/OpenMP/OMPConstants.h
@@ -15,9 +15,8 @@
#define LLVM_FRONTEND_OPENMP_OMPCONSTANTS_H
#include "llvm/ADT/BitmaskEnum.h"
-
#include "llvm/ADT/StringRef.h"
-#include "llvm/Frontend/OpenMP/OMP.h.inc"
+#include "llvm/Frontend/OpenMP/OMP.h"
namespace llvm {
namespace omp {
diff --git a/llvm/lib/Frontend/OpenMP/OMP.cpp b/llvm/lib/Frontend/OpenMP/OMP.cpp
index eac5d4168c5ca4..4f2f95392648b3 100644
--- a/llvm/lib/Frontend/OpenMP/OMP.cpp
+++ b/llvm/lib/Frontend/OpenMP/OMP.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include "llvm/Frontend/OpenMP/OMP.h.inc"
+#include "llvm/Frontend/OpenMP/OMP.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSwitch.h"
More information about the flang-commits
mailing list