[PATCH] D140726: lld: CHECK->LLD_CHECK to reduce chance of conflict with other libraries
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 28 06:26:18 PST 2022
dblaikie added a comment.
In D140726#4018459 <https://reviews.llvm.org/D140726#4018459>, @thakis wrote:
> This is only used in lld cpp files, and lld's header files aren't meant to be used outside it. So halide is doing something unsupported.
I don't think Halide's doing something wrong here - it's including `lld/Common/Driver.h` which states:
// Generic entry point when using LLD as a library, safe for re-entry, supports
// crash recovery.
And that includes `lld/Common/CommonLinkerContext.h` which includes `lld/Common/ErrorHandler.h`
> Could halide undef this macro after including the lld header and before including absl headers instead?
Perhaps? I guess alternatively `lld/Common/Driver.h` could undef it at the end, but including any other lld header would risk breakage (since they might expect the macro to still be defined) - would probably make implementing that header tricky - needing to redefine that macro back again in the implementation file, etc.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140726/new/
https://reviews.llvm.org/D140726
More information about the llvm-commits
mailing list