You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[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
0 commit comments