[all-commits] [llvm/llvm-project] bd6cd9: [MLIR][OpenMP][NFC] Use header guards for tblgen'd...
Michael Kruse via All-commits
all-commits at lists.llvm.org
Thu Jul 3 01:42:40 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: bd6cd92984e7a30cb91e4f069a0bacc5c582a234
https://github.com/llvm/llvm-project/commit/bd6cd92984e7a30cb91e4f069a0bacc5c582a234
Author: Michael Kruse <llvm-project at meinersbur.de>
Date: 2025-07-03 (Thu, 03 Jul 2025)
Changed paths:
M mlir/include/mlir/Dialect/OpenMP/OpenMPClauseOperands.h
M mlir/include/mlir/Dialect/OpenMP/OpenMPDialect.h
M mlir/include/mlir/Dialect/OpenMP/OpenMPInterfaces.h
A mlir/include/mlir/Dialect/OpenMP/OpenMPOpsAttributes.h
A mlir/include/mlir/Dialect/OpenMP/OpenMPOpsEnums.h
Log Message:
-----------
[MLIR][OpenMP][NFC] Use header guards for tblgen'd definitions (#146684)
Currently the generated `.h.inc` files are included coarse-grained
header files that just happen to work in the current source. But if at
another header, call it `A.h`, a definition from e.g.
"OpenMPOpsEnums.h.inc" is needed, it cannot be included there because it
`A.h` is also included in `B.h` that uses `OpenMPClauseOperands.h` which
already includes `OpenMPOpsEnums.h.inc`. So the content of
`OpenMPOpsEnums.h.inc` appears twice in the translation unit result in a
compile failure because the same enum cannot be defined twice.
This patch tries to use more fine-grained include header for generated
content protected by header guards, so `OpenMPOpsEnums.h` can be
included when ever needed. Some is done with `OpenMPOpsAttributes.h`.
Needed for #144785. Also fixes the recursive #include of
`OpenMPDialect.h` and `OpenMPInterfaces.h`.
Patch extracted out of #144785
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list