Replace casts of __impl_ with the correct reinterpret_cast of the
address. Restores the assembly of before r198504. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@198698 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
908b5d7f92
commit
4a07e0e159
@ -102,28 +102,28 @@ namespace std // purposefully not using versioning namespace
|
||||
|
||||
logic_error::logic_error(const string& msg)
|
||||
{
|
||||
__libcpp_nmstr *s = static_cast<__libcpp_nmstr *>(__imp_);
|
||||
__libcpp_nmstr *s = reinterpret_cast<__libcpp_nmstr *>(&__imp_);
|
||||
::new(s) __libcpp_nmstr(msg.c_str());
|
||||
}
|
||||
|
||||
logic_error::logic_error(const char* msg)
|
||||
{
|
||||
__libcpp_nmstr *s = static_cast<__libcpp_nmstr *>(__imp_);
|
||||
__libcpp_nmstr *s = reinterpret_cast<__libcpp_nmstr *>(&__imp_);
|
||||
::new(s) __libcpp_nmstr(msg);
|
||||
}
|
||||
|
||||
logic_error::logic_error(const logic_error& le) _NOEXCEPT
|
||||
{
|
||||
__libcpp_nmstr *s = static_cast<__libcpp_nmstr *>(__imp_);
|
||||
const __libcpp_nmstr *s2 = static_cast<const __libcpp_nmstr *>(le.__imp_);
|
||||
__libcpp_nmstr *s = reinterpret_cast<__libcpp_nmstr *>(&__imp_);
|
||||
const __libcpp_nmstr *s2 = reinterpret_cast<const __libcpp_nmstr *>(&le.__imp_);
|
||||
::new(s) __libcpp_nmstr(*s2);
|
||||
}
|
||||
|
||||
logic_error&
|
||||
logic_error::operator=(const logic_error& le) _NOEXCEPT
|
||||
{
|
||||
__libcpp_nmstr *s1 = static_cast<__libcpp_nmstr *>(__imp_);
|
||||
const __libcpp_nmstr *s2 = static_cast<const __libcpp_nmstr *>(le.__imp_);
|
||||
__libcpp_nmstr *s1 = reinterpret_cast<__libcpp_nmstr *>(&__imp_);
|
||||
const __libcpp_nmstr *s2 = reinterpret_cast<const __libcpp_nmstr *>(&le.__imp_);
|
||||
*s1 = *s2;
|
||||
return *this;
|
||||
}
|
||||
@ -132,14 +132,14 @@ logic_error::operator=(const logic_error& le) _NOEXCEPT
|
||||
|
||||
logic_error::~logic_error() _NOEXCEPT
|
||||
{
|
||||
__libcpp_nmstr *s = static_cast<__libcpp_nmstr *>(__imp_);
|
||||
__libcpp_nmstr *s = reinterpret_cast<__libcpp_nmstr *>(&__imp_);
|
||||
s->~__libcpp_nmstr();
|
||||
}
|
||||
|
||||
const char*
|
||||
logic_error::what() const _NOEXCEPT
|
||||
{
|
||||
__libcpp_nmstr *s = static_cast<__libcpp_nmstr *>(__imp_);
|
||||
const __libcpp_nmstr *s = reinterpret_cast<const __libcpp_nmstr *>(&__imp_);
|
||||
return s->c_str();
|
||||
}
|
||||
|
||||
@ -147,28 +147,28 @@ logic_error::what() const _NOEXCEPT
|
||||
|
||||
runtime_error::runtime_error(const string& msg)
|
||||
{
|
||||
__libcpp_nmstr *s = static_cast<__libcpp_nmstr *>(__imp_);
|
||||
__libcpp_nmstr *s = reinterpret_cast<__libcpp_nmstr *>(&__imp_);
|
||||
::new(s) __libcpp_nmstr(msg.c_str());
|
||||
}
|
||||
|
||||
runtime_error::runtime_error(const char* msg)
|
||||
{
|
||||
__libcpp_nmstr *s = static_cast<__libcpp_nmstr *>(__imp_);
|
||||
__libcpp_nmstr *s = reinterpret_cast<__libcpp_nmstr *>(&__imp_);
|
||||
::new(s) __libcpp_nmstr(msg);
|
||||
}
|
||||
|
||||
runtime_error::runtime_error(const runtime_error& le) _NOEXCEPT
|
||||
{
|
||||
__libcpp_nmstr *s = static_cast<__libcpp_nmstr *>(__imp_);
|
||||
const __libcpp_nmstr *s2 = static_cast<const __libcpp_nmstr *>(le.__imp_);
|
||||
__libcpp_nmstr *s = reinterpret_cast<__libcpp_nmstr *>(&__imp_);
|
||||
const __libcpp_nmstr *s2 = reinterpret_cast<const __libcpp_nmstr *>(&le.__imp_);
|
||||
::new(s) __libcpp_nmstr(*s2);
|
||||
}
|
||||
|
||||
runtime_error&
|
||||
runtime_error::operator=(const runtime_error& le) _NOEXCEPT
|
||||
{
|
||||
__libcpp_nmstr *s1 = static_cast<__libcpp_nmstr *>(__imp_);
|
||||
const __libcpp_nmstr *s2 = static_cast<const __libcpp_nmstr *>(le.__imp_);
|
||||
__libcpp_nmstr *s1 = reinterpret_cast<__libcpp_nmstr *>(&__imp_);
|
||||
const __libcpp_nmstr *s2 = reinterpret_cast<const __libcpp_nmstr *>(&le.__imp_);
|
||||
*s1 = *s2;
|
||||
return *this;
|
||||
}
|
||||
@ -177,14 +177,14 @@ runtime_error::operator=(const runtime_error& le) _NOEXCEPT
|
||||
|
||||
runtime_error::~runtime_error() _NOEXCEPT
|
||||
{
|
||||
__libcpp_nmstr *s = static_cast<__libcpp_nmstr *>(__imp_);
|
||||
__libcpp_nmstr *s = reinterpret_cast<__libcpp_nmstr *>(&__imp_);
|
||||
s->~__libcpp_nmstr();
|
||||
}
|
||||
|
||||
const char*
|
||||
runtime_error::what() const _NOEXCEPT
|
||||
{
|
||||
__libcpp_nmstr *s = static_cast<__libcpp_nmstr *>(__imp_);
|
||||
const __libcpp_nmstr *s = reinterpret_cast<const __libcpp_nmstr *>(&__imp_);
|
||||
return s->c_str();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user