Eliminate more symbols multiply defined between libsupc++ and libc++.
The remaining multiple definitions were flushed out by attempting to link libsupc++ and libc++ into the same executable with --whole-archive, e.g. clang++ -I../llvm/projects/libcxx/include -nodefaultlibs -Wl,--whole-archive lib/libc++.a /usr/lib/gcc/x86_64-linux-gnu/4.6/libsupc++.a -Wl,--no-whole-archive -lgcc -lgcc_s -lc -lpthread -lrt (The same technique was used to flush out multiple definitions in libstdc++.) Differential Revision: http://llvm-reviews.chandlerc.com/D1824 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192074 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ae2b90b86d
commit
40455c65da
@ -213,10 +213,14 @@ nested_exception::nested_exception() _NOEXCEPT
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(__GLIBCXX__)
|
||||||
|
|
||||||
nested_exception::~nested_exception() _NOEXCEPT
|
nested_exception::~nested_exception() _NOEXCEPT
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
_LIBCPP_NORETURN
|
_LIBCPP_NORETURN
|
||||||
void
|
void
|
||||||
nested_exception::rethrow_nested() const
|
nested_exception::rethrow_nested() const
|
||||||
|
16
src/new.cpp
16
src/new.cpp
@ -30,11 +30,13 @@
|
|||||||
#if defined(LIBCXXRT) || __has_include(<cxxabi.h>)
|
#if defined(LIBCXXRT) || __has_include(<cxxabi.h>)
|
||||||
#include <cxxabi.h>
|
#include <cxxabi.h>
|
||||||
#endif // __has_include(<cxxabi.h>)
|
#endif // __has_include(<cxxabi.h>)
|
||||||
#ifndef _LIBCPPABI_VERSION
|
#if !defined(_LIBCPPABI_VERSION) && !defined(__GLIBCXX__)
|
||||||
static std::new_handler __new_handler;
|
static std::new_handler __new_handler;
|
||||||
#endif // _LIBCPPABI_VERSION
|
#endif // _LIBCPPABI_VERSION
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __GLIBCXX__
|
||||||
|
|
||||||
// Implement all new and delete operators as weak definitions
|
// Implement all new and delete operators as weak definitions
|
||||||
// in this shared library, so that they can be overriden by programs
|
// in this shared library, so that they can be overriden by programs
|
||||||
// that define non-weak copies of the functions.
|
// that define non-weak copies of the functions.
|
||||||
@ -143,13 +145,19 @@ operator delete[] (void* ptr, const std::nothrow_t&) _NOEXCEPT
|
|||||||
::operator delete[](ptr);
|
::operator delete[](ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // !__GLIBCXX__
|
||||||
|
|
||||||
namespace std
|
namespace std
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#ifndef __GLIBCXX__
|
||||||
const nothrow_t nothrow = {};
|
const nothrow_t nothrow = {};
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef _LIBCPPABI_VERSION
|
#ifndef _LIBCPPABI_VERSION
|
||||||
|
|
||||||
|
#ifndef __GLIBCXX__
|
||||||
|
|
||||||
new_handler
|
new_handler
|
||||||
set_new_handler(new_handler handler) _NOEXCEPT
|
set_new_handler(new_handler handler) _NOEXCEPT
|
||||||
{
|
{
|
||||||
@ -162,12 +170,16 @@ get_new_handler() _NOEXCEPT
|
|||||||
return __sync_fetch_and_add(&__new_handler, (new_handler)0);
|
return __sync_fetch_and_add(&__new_handler, (new_handler)0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // !__GLIBCXX__
|
||||||
|
|
||||||
#ifndef LIBCXXRT
|
#ifndef LIBCXXRT
|
||||||
|
|
||||||
bad_alloc::bad_alloc() _NOEXCEPT
|
bad_alloc::bad_alloc() _NOEXCEPT
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef __GLIBCXX__
|
||||||
|
|
||||||
bad_alloc::~bad_alloc() _NOEXCEPT
|
bad_alloc::~bad_alloc() _NOEXCEPT
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -178,6 +190,8 @@ bad_alloc::what() const _NOEXCEPT
|
|||||||
return "std::bad_alloc";
|
return "std::bad_alloc";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // !__GLIBCXX__
|
||||||
|
|
||||||
#endif //LIBCXXRT
|
#endif //LIBCXXRT
|
||||||
|
|
||||||
bad_array_new_length::bad_array_new_length() _NOEXCEPT
|
bad_array_new_length::bad_array_new_length() _NOEXCEPT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user