summaryrefslogtreecommitdiffstats
path: root/libcxx/include/stdexcept
diff options
context:
space:
mode:
authorJoerg Sonnenberger <joerg@bec.de>2014-04-30 19:54:11 +0000
committerJoerg Sonnenberger <joerg@bec.de>2014-04-30 19:54:11 +0000
commita1fbf3459fd1a2f480183615893065f0c2e9dae9 (patch)
tree186da7f401801931e60f5597d26eff3694a6becd /libcxx/include/stdexcept
parent59f0cba30f989e5a90a3d33c9893cdc87f116b83 (diff)
downloadbcm5719-llvm-a1fbf3459fd1a2f480183615893065f0c2e9dae9.tar.gz
bcm5719-llvm-a1fbf3459fd1a2f480183615893065f0c2e9dae9.zip
Exceptions store the message as reference counted string for
compatibility to libstdc++. Move the implementation into a header for easier sharing with libc++abi. Merge a number of improvements from that version. Provide a POD definition for <stdexcept>'s public use to avoid cast dances. Discussed with Marshall Clow. llvm-svn: 207695
Diffstat (limited to 'libcxx/include/stdexcept')
-rw-r--r--libcxx/include/stdexcept12
1 files changed, 10 insertions, 2 deletions
diff --git a/libcxx/include/stdexcept b/libcxx/include/stdexcept
index ef5de595f03..5fc912a644b 100644
--- a/libcxx/include/stdexcept
+++ b/libcxx/include/stdexcept
@@ -50,6 +50,14 @@ public:
#pragma GCC system_header
#endif
+#ifndef _LIBCPP___REFSTRING
+_LIBCPP_BEGIN_NAMESPACE_STD
+class _LIBCPP_HIDDEN __libcpp_refstring {
+ const char *__imp_;
+};
+_LIBCPP_END_NAMESPACE_STD
+#endif
+
namespace std // purposefully not using versioning namespace
{
@@ -57,7 +65,7 @@ class _LIBCPP_EXCEPTION_ABI logic_error
: public exception
{
private:
- void* __imp_;
+ _VSTD::__libcpp_refstring __imp_;
public:
explicit logic_error(const string&);
explicit logic_error(const char*);
@@ -74,7 +82,7 @@ class _LIBCPP_EXCEPTION_ABI runtime_error
: public exception
{
private:
- void* __imp_;
+ _VSTD::__libcpp_refstring __imp_;
public:
explicit runtime_error(const string&);
explicit runtime_error(const char*);
OpenPOWER on IntegriCloud