[libcxx-commits] [PATCH] D67804: [libunwind] Avoid warning about unused typedef
Joel Klinghed via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Sep 20 01:06:03 PDT 2019
the_jk created this revision.
the_jk added reviewers: compnerd, krasin.
Herald added subscribers: libcxx-commits, christof, kristof.beyls, krytarowski, aprantl, srhines.
Herald added a project: libc++.
Move the definition of Elf_Addr typedef to the only place it is used, to avoid:
In file included from /home/the_jk/source/llvm-project/libunwind/src/libunwind.cpp:21:
llvm-project/libunwind/src/AddressSpace.hpp:501:28: warning: unused typedef 'Elf_Addr' [-Wunused-local-typedef]
typedef ElfW(Addr) Elf_Addr;
^
1 warning generated.
when compiling for Android with _LIBUNWIND_ARM_EHABI defined and
_LIBUNWIND_SUPPORT_DWARF_UNWIND not defined.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D67804
Files:
libunwind/src/AddressSpace.hpp
Index: libunwind/src/AddressSpace.hpp
===================================================================
--- libunwind/src/AddressSpace.hpp
+++ libunwind/src/AddressSpace.hpp
@@ -497,9 +497,6 @@
#if !defined(Elf_Phdr)
typedef ElfW(Phdr) Elf_Phdr;
#endif
-#if !defined(Elf_Addr) && defined(__ANDROID__)
- typedef ElfW(Addr) Elf_Addr;
-#endif
#if defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND)
#if !defined(_LIBUNWIND_SUPPORT_DWARF_INDEX)
@@ -507,6 +504,9 @@
#endif
size_t object_length;
#if defined(__ANDROID__)
+# if !defined(Elf_Addr)
+ typedef ElfW(Addr) Elf_Addr;
+# endif
Elf_Addr image_base =
pinfo->dlpi_phnum
? reinterpret_cast<Elf_Addr>(pinfo->dlpi_phdr) -
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67804.220959.patch
Type: text/x-patch
Size: 744 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190920/152f1c7c/attachment-0001.bin>
More information about the libcxx-commits
mailing list