[Mlir-commits] [llvm] [mlir] [NFC] Add explicit #include abi-breaking.h where its macros are used. (PR #109453)
David Blaikie
llvmlistbot at llvm.org
Wed Sep 25 15:08:08 PDT 2024
dwblaikie wrote:
> > None of the MLIR changes are needed, we are covered by -Wundef I believe.
>
> There are some places in MLIR where the option will not work, e.g.
>
> https://github.com/llvm/llvm-project/blob/fe06a6daae6be85d47cd1e51654e91f9ac6e63d7/mlir/include/mlir/Dialect/Transform/Interfaces/TransformInterfaces.h#L199
>
>
> , since `-Wundef` works for `#if` only, not for `#ifdef`.
> We have no coding style requirement of the topic **and** pre-commit tests/checks. While we have no such requirements, the macros which configure compilation still be fragile.
I guess that usage is just buggy/incorrect, unfortunately (unfortunately in terms of this not providing any extra motivation for this proposed patch, I think) - ifdef abi_breaking_checks will be true even when abi_breaking_checks is disabled (because it'll be disabled by being defined to 0, so ifdef will still be true because it is defined (albeit to 0))
https://github.com/llvm/llvm-project/pull/109453
More information about the Mlir-commits
mailing list