[PATCH] D32838: [libcxx] Make __shared_weak_count VTable consistent across all build configurations
Louis Dionne via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 20 05:16:52 PDT 2020
ldionne updated this revision to Diff 299344.
ldionne added a comment.
Herald added a subscriber: mgorny.
Herald added a project: libc++abi.
Herald added a reviewer: libc++abi.
Remove uses of _LIBCPP_BUILD_STATIC
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D32838/new/
https://reviews.llvm.org/D32838
Files:
libcxx/include/memory
libcxx/src/memory.cpp
libcxxabi/CMakeLists.txt
Index: libcxxabi/CMakeLists.txt
===================================================================
--- libcxxabi/CMakeLists.txt
+++ libcxxabi/CMakeLists.txt
@@ -338,10 +338,6 @@
list(APPEND LIBCXXABI_COMPILE_FLAGS -DNDEBUG)
endif()
endif()
-# Static library
-if (NOT LIBCXXABI_ENABLE_SHARED)
- list(APPEND LIBCXXABI_COMPILE_FLAGS -D_LIBCPP_BUILD_STATIC)
-endif()
# Threading
if (NOT LIBCXXABI_ENABLE_THREADS)
Index: libcxx/src/memory.cpp
===================================================================
--- libcxx/src/memory.cpp
+++ libcxx/src/memory.cpp
@@ -124,16 +124,12 @@
return nullptr;
}
-#if !defined(_LIBCPP_NO_RTTI) || !defined(_LIBCPP_BUILD_STATIC)
-
const void*
__shared_weak_count::__get_deleter(const type_info&) const _NOEXCEPT
{
return nullptr;
}
-#endif // _LIBCPP_NO_RTTI
-
#if !defined(_LIBCPP_HAS_NO_ATOMIC_HEADER)
_LIBCPP_SAFE_STATIC static const std::size_t __sp_mut_count = 16;
Index: libcxx/include/memory
===================================================================
--- libcxx/include/memory
+++ libcxx/include/memory
@@ -3271,13 +3271,7 @@
long use_count() const _NOEXCEPT {return __shared_count::use_count();}
__shared_weak_count* lock() _NOEXCEPT;
- // Define the function out only if we build static libc++ without RTTI.
- // Otherwise we may break clients who need to compile their projects with
- // -fno-rtti and yet link against a libc++.dylib compiled
- // without -fno-rtti.
-#if !defined(_LIBCPP_NO_RTTI) || !defined(_LIBCPP_BUILD_STATIC)
virtual const void* __get_deleter(const type_info&) const _NOEXCEPT;
-#endif
private:
virtual void __on_zero_shared_weak() _NOEXCEPT = 0;
};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32838.299344.patch
Type: text/x-patch
Size: 1701 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201020/e8b60f87/attachment.bin>
More information about the cfe-commits
mailing list