[PATCH] D107388: Work around non-existence of ElfW(type) macro on FreeBSD
Dimitry Andric via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 3 13:35:28 PDT 2021
dim added inline comments.
================
Comment at: compiler-rt/lib/profile/InstrProfilingPlatformLinux.c:21
+#if defined(__FreeBSD__) && !defined(ElfW)
+#define ElfW(type) __ElfN(type)
+#endif
----------------
MaskRay wrote:
> If FreeBSD will have the macro, add a comment so that this chunk can be removed in the future.
Newer versions might have it, but older released versions won't. That's what the !defined(ElfW) is for. But you're right that a comment is appropriate.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107388/new/
https://reviews.llvm.org/D107388
More information about the llvm-commits
mailing list