[libcxx-commits] [libcxxabi] r373602 - [libc++abi] Do not export some implementation-detail functions

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Thu Oct 3 07:24:53 PDT 2019


Author: ldionne
Date: Thu Oct  3 07:24:53 2019
New Revision: 373602

URL: http://llvm.org/viewvc/llvm-project?rev=373602&view=rev
Log:
[libc++abi] Do not export some implementation-detail functions

Summary:
Those functions started being mistakenly exported from the libc++abi
shared library after commit r344152 in 2018. Removing these symbols is
technically an ABI break. However, they are not part of the C++ ABI,
they haven't ever been re-exported from libc++, and they are not
declared in any public header, so it's very unlikely that calls to
these functions exist out there. Also, the functions have reserved
names, so any impacted user would have to have tried really hard
being broken by this removal.

Note that avoiding this kind of problem is exactly why we're now
controlling exported symbols explicitly with a textual list.

Also note that applying the hidden visibility attribute is necessary
because the list of exported symbols is only used on Apple platforms
for the time being.

Reviewers: phosek, mclow.lists, EricWF

Subscribers: christof, jkorous, dexonsmith, libcxx-commits

Tags: #libc

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

Modified:
    libcxxabi/trunk/lib/itanium-base.exp
    libcxxabi/trunk/src/cxa_exception.h

Modified: libcxxabi/trunk/lib/itanium-base.exp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/lib/itanium-base.exp?rev=373602&r1=373601&r2=373602&view=diff
==============================================================================
--- libcxxabi/trunk/lib/itanium-base.exp (original)
+++ libcxxabi/trunk/lib/itanium-base.exp Thu Oct  3 07:24:53 2019
@@ -366,8 +366,3 @@ __ZSt14set_unexpectedPFvvE
 __ZSt15get_new_handlerv
 __ZSt15set_new_handlerPFvvE
 __ZSt9terminatev
-
-# Misc
-__ZN10__cxxabiv119__getExceptionClassEPK17_Unwind_Exception
-__ZN10__cxxabiv119__setExceptionClassEP17_Unwind_Exceptiony
-__ZN10__cxxabiv121__isOurExceptionClassEPK17_Unwind_Exception

Modified: libcxxabi/trunk/src/cxa_exception.h
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_exception.h?rev=373602&r1=373601&r2=373602&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_exception.h (original)
+++ libcxxabi/trunk/src/cxa_exception.h Thu Oct  3 07:24:53 2019
@@ -23,9 +23,9 @@ static const uint64_t kOurExceptionClass
 static const uint64_t kOurDependentExceptionClass = 0x434C4E47432B2B01; // CLNGC++\1
 static const uint64_t get_vendor_and_language     = 0xFFFFFFFFFFFFFF00; // mask for CLNGC++
 
-uint64_t __getExceptionClass  (const _Unwind_Exception*);
-void     __setExceptionClass  (      _Unwind_Exception*, uint64_t);
-bool     __isOurExceptionClass(const _Unwind_Exception*);
+_LIBCXXABI_HIDDEN uint64_t __getExceptionClass  (const _Unwind_Exception*);
+_LIBCXXABI_HIDDEN void     __setExceptionClass  (      _Unwind_Exception*, uint64_t);
+_LIBCXXABI_HIDDEN bool     __isOurExceptionClass(const _Unwind_Exception*);
 
 struct _LIBCXXABI_HIDDEN __cxa_exception {
 #if defined(__LP64__) || defined(_LIBCXXABI_ARM_EHABI)




More information about the libcxx-commits mailing list