[PATCH] D156496: [libunwind] Fix build with -Wunused-function

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 27 20:23:26 PDT 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG3da76c211617: [libunwind] Fix build with -Wunused-function (authored by smeenai).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156496/new/

https://reviews.llvm.org/D156496

Files:
  libunwind/src/Unwind-EHABI.cpp


Index: libunwind/src/Unwind-EHABI.cpp
===================================================================
--- libunwind/src/Unwind-EHABI.cpp
+++ libunwind/src/Unwind-EHABI.cpp
@@ -885,8 +885,11 @@
   return result;
 }
 
-static uint64_t ValueAsBitPattern(_Unwind_VRS_DataRepresentation representation,
-                                  void* valuep) {
+// Only used in _LIBUNWIND_TRACE_API, which is a no-op when assertions are
+// disabled.
+[[gnu::unused]] static uint64_t
+ValueAsBitPattern(_Unwind_VRS_DataRepresentation representation,
+                  const void *valuep) {
   uint64_t value = 0;
   switch (representation) {
     case _UVRSD_UINT32:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156496.545005.patch
Type: text/x-patch
Size: 660 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230728/1880007a/attachment.bin>


More information about the llvm-commits mailing list