This is an archive of the discontinued LLVM Phabricator instance.

[libcxxabi] Avoid warnings about an unused parameter when building for windows
AbandonedPublic

Authored by mstorsjo on Jan 20 2019, 1:18 PM.

Details

Diff Detail

Event Timeline

mstorsjo created this revision.Jan 20 2019, 1:18 PM

This change already exists on my local clone of libc++abi. I see it was added there:

commit f5e7bafcccd2542b8c093172d251ac594a93a142
Author: Pirama Arumuga Nainar <pirama@google.com>
Date:   Fri Sep 21 20:01:22 2018 +0000

    [libc++abi] is_strcmp parameter to is_equal is unused for WIN32

    Summary: Mark it as unused to avoid -Wunused-parameter.

    Reviewers: EricWF, srhines, mstorsjo

    Subscribers: christof, ldionne, libcxx-commits, cfe-commits

    Differential Revision: https://reviews.llvm.org/D52368

Notes:
    git-svn-rev: 342764

diff --git a/libcxxabi/src/private_typeinfo.cpp b/libcxxabi/src/private_typeinfo.cpp
index a0326a188c4..67a5a62dc80 100644
--- a/libcxxabi/src/private_typeinfo.cpp
+++ b/libcxxabi/src/private_typeinfo.cpp
@@ -64,6 +64,7 @@ is_equal(const std::type_info* x, const std::type_info* y, bool use_strcmp)
         return x == y;
     return strcmp(x->name(), y->name()) == 0;
 #else
+    (void) use_strcmp;
     return (x == y) || (strcmp(x->name(), y->name()) == 0);
 #endif
 }

Are you working off of trunk libc++abi?

mstorsjo abandoned this revision.Jan 22 2019, 8:12 AM

Oh, oops, I had indeed been testing with a slightly older version of libcxxabi. The libunwind patches are against the very latest trunk though.