Skip to content

Commit 141ebdd

Browse files
authored
[Frontend][OpenMP] introduce OMP.h header file, use it instead of OMP… (llvm#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.
1 parent aa26faf commit 141ebdd

File tree

4 files changed

+21
-4
lines changed

4 files changed

+21
-4
lines changed

flang/lib/Semantics/rewrite-directives.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include "flang/Parser/parse-tree.h"
1212
#include "flang/Semantics/semantics.h"
1313
#include "flang/Semantics/symbol.h"
14-
#include "llvm/Frontend/OpenMP/OMP.h.inc"
14+
#include "llvm/Frontend/OpenMP/OMP.h"
1515
#include <list>
1616

1717
namespace Fortran::semantics {
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//===-- OMP.h - Core OpenMP definitions and declarations ---------- C++ -*-===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
//
9+
// This file contains the core set of OpenMP definitions and declarations.
10+
//
11+
//===----------------------------------------------------------------------===//
12+
13+
#ifndef LLVM_FRONTEND_OPENMP_OMP_H
14+
#define LLVM_FRONTEND_OPENMP_OMP_H
15+
16+
#include "llvm/Frontend/OpenMP/OMP.h.inc"
17+
18+
#endif // LLVM_FRONTEND_OPENMP_OMP_H

llvm/include/llvm/Frontend/OpenMP/OMPConstants.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@
1515
#define LLVM_FRONTEND_OPENMP_OMPCONSTANTS_H
1616

1717
#include "llvm/ADT/BitmaskEnum.h"
18-
1918
#include "llvm/ADT/StringRef.h"
20-
#include "llvm/Frontend/OpenMP/OMP.h.inc"
19+
#include "llvm/Frontend/OpenMP/OMP.h"
2120

2221
namespace llvm {
2322
namespace omp {

llvm/lib/Frontend/OpenMP/OMP.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include "llvm/Frontend/OpenMP/OMP.h.inc"
9+
#include "llvm/Frontend/OpenMP/OMP.h"
1010

1111
#include "llvm/ADT/StringRef.h"
1212
#include "llvm/ADT/StringSwitch.h"

0 commit comments

Comments
 (0)