[libunwind] r372427 - Unwind: avoid warning about unused typedef
Saleem Abdulrasool via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 20 13:46:33 PDT 2019
Author: compnerd
Date: Fri Sep 20 13:46:33 2019
New Revision: 372427
URL: http://llvm.org/viewvc/llvm-project?rev=372427&view=rev
Log:
Unwind: avoid warning about unused typedef
Move the definition of Elf_Addr typedef to the only place it is used, to avoid:
```
llvm-project/libunwind/src/AddressSpace.hpp:501:28: warning: unused typedef 'Elf_Addr' [-Wunused-local-typedef]
```
when compiling for Android with _LIBUNWIND_ARM_EHABI defined and
_LIBUNWIND_SUPPORT_DWARF_UNWIND not defined.
Patch by Joel Klinghed!
Modified:
libunwind/trunk/src/AddressSpace.hpp
Modified: libunwind/trunk/src/AddressSpace.hpp
URL: http://llvm.org/viewvc/llvm-project/libunwind/trunk/src/AddressSpace.hpp?rev=372427&r1=372426&r2=372427&view=diff
==============================================================================
--- libunwind/trunk/src/AddressSpace.hpp (original)
+++ libunwind/trunk/src/AddressSpace.hpp Fri Sep 20 13:46:33 2019
@@ -497,9 +497,6 @@ inline bool LocalAddressSpace::findUnwin
#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 @@ inline bool LocalAddressSpace::findUnwin
#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) -
More information about the cfe-commits
mailing list