[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:54:07 PDT 2021
dim updated this revision to Diff 363875.
dim added a comment.
Add comment about the FreeBSD ElfW(type) workaround.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107388/new/
https://reviews.llvm.org/D107388
Files:
compiler-rt/lib/profile/InstrProfilingPlatformLinux.c
Index: compiler-rt/lib/profile/InstrProfilingPlatformLinux.c
===================================================================
--- compiler-rt/lib/profile/InstrProfilingPlatformLinux.c
+++ compiler-rt/lib/profile/InstrProfilingPlatformLinux.c
@@ -18,6 +18,11 @@
#include "InstrProfilingInternal.h"
#if defined(__FreeBSD__) && !defined(ElfW)
+/*
+ * FreeBSD's elf.h and link.h headers do not define the ElfW(type) macro yet.
+ * If this is added to all supported FreeBSD versions in the future, this
+ * compatibility macro can be removed.
+ */
#define ElfW(type) __ElfN(type)
#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107388.363875.patch
Type: text/x-patch
Size: 593 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210803/a22cba97/attachment.bin>
More information about the llvm-commits
mailing list