[PATCH] libc++abi: Make the .eh_frame_hdr code work on FreeBSD as well
Ed Schouten
ed at nuxi.nl
Tue Mar 31 01:52:35 PDT 2015
================
Comment at: src/Unwind/AddressSpace.hpp:67
@@ +66,3 @@
+// locally.
+#ifndef ElfW
+#define ElfW(type) ElfW2(__INTPTR_WIDTH__, type)
----------------
compnerd wrote:
> I tend to prefer #if !defined() as it makes it easier to extend in the future if necessary.
Done!
================
Comment at: src/Unwind/AddressSpace.hpp:70
@@ +69,3 @@
+#define ElfW2(width, type) ElfW3(width, type)
+#define ElfW3(width, type) Elf##width##_##type
+#endif
----------------
compnerd wrote:
> It would be nice if you renamed `ElfW2` and `ElfW3` to something more generic (`GLUE`, `GLUE_EXPANDED`?). They don't have anything to do with ELF specifically.
I looked into it a bit more closely and it looks like we can avoid it altogether.
Systems that don't provide ElfW() seem to provide additional typedefs so that we can just Elf_XXX. There is no need to put the __INTPTR_WIDTH__ in between. Do you think that looks all right?
http://reviews.llvm.org/D8169
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the cfe-commits
mailing list