[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 10:40:01 PDT 2024
dwblaikie wrote:
> None of the MLIR changes are needed, we are covered by -Wundef I believe.
This patch seems to be an "include what you use" fix, which generally fix fragility (as the description says - cases where if an unrelated header was removed, the build would fail because the file that included the unrelated header was depending on that header providing some other header that's used). Looks like `-Wundef` would only protect from using a macro that's truly undefined, yeah?
> Also I feel we debated this before, but the PR description is still written in a way that is just completely confusing to me. Can you please rework all this?
I think I'm mostly following it - could you clarify what's confusing to you?
I will say I don't understand the second sentence ("For example, clangd may report even abi-breaking.h as "no used" in case it defines a macro, that is explicitly used with #ifdef."). ooh, actually, I think I follow - clangd could identify abi-breaking.h as unused in some other header x.h (because clangd would do a local analysis, and find abi-breaking.h unused in x.h), even though the macros are used from from some other file that /includes/ x.h.
https://github.com/llvm/llvm-project/pull/109453
More information about the Mlir-commits
mailing list