summaryrefslogtreecommitdiff
path: root/src/support/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'src/support/runtime')
-rw-r--r--src/support/runtime/exception_fallback.ipp7
-rw-r--r--src/support/runtime/exception_glibcxx.ipp7
-rw-r--r--src/support/runtime/exception_libcxxabi.ipp7
-rw-r--r--src/support/runtime/exception_libcxxrt.ipp7
-rw-r--r--src/support/runtime/exception_msvc.ipp11
-rw-r--r--src/support/runtime/exception_pointer_cxxabi.ipp7
-rw-r--r--src/support/runtime/exception_pointer_glibcxx.ipp7
-rw-r--r--src/support/runtime/exception_pointer_msvc.ipp7
-rw-r--r--src/support/runtime/exception_pointer_unimplemented.ipp7
-rw-r--r--src/support/runtime/new_handler_fallback.ipp7
-rw-r--r--src/support/runtime/stdexcept_default.ipp64
-rw-r--r--src/support/runtime/stdexcept_vcruntime.ipp16
12 files changed, 112 insertions, 42 deletions
diff --git a/src/support/runtime/exception_fallback.ipp b/src/support/runtime/exception_fallback.ipp
index 16d387b99e8cc..376a0381f5452 100644
--- a/src/support/runtime/exception_fallback.ipp
+++ b/src/support/runtime/exception_fallback.ipp
@@ -1,10 +1,9 @@
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
diff --git a/src/support/runtime/exception_glibcxx.ipp b/src/support/runtime/exception_glibcxx.ipp
index dda4432b508ab..4bf3c4d877598 100644
--- a/src/support/runtime/exception_glibcxx.ipp
+++ b/src/support/runtime/exception_glibcxx.ipp
@@ -1,10 +1,9 @@
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
diff --git a/src/support/runtime/exception_libcxxabi.ipp b/src/support/runtime/exception_libcxxabi.ipp
index feefc5152891c..6bc049bf382d8 100644
--- a/src/support/runtime/exception_libcxxabi.ipp
+++ b/src/support/runtime/exception_libcxxabi.ipp
@@ -1,10 +1,9 @@
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
diff --git a/src/support/runtime/exception_libcxxrt.ipp b/src/support/runtime/exception_libcxxrt.ipp
index 52fe8635db77e..0ebffdedba947 100644
--- a/src/support/runtime/exception_libcxxrt.ipp
+++ b/src/support/runtime/exception_libcxxrt.ipp
@@ -1,10 +1,9 @@
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
diff --git a/src/support/runtime/exception_msvc.ipp b/src/support/runtime/exception_msvc.ipp
index 042d3add6c7f7..7315b8261b768 100644
--- a/src/support/runtime/exception_msvc.ipp
+++ b/src/support/runtime/exception_msvc.ipp
@@ -1,10 +1,9 @@
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -83,7 +82,7 @@ int uncaught_exceptions() _NOEXCEPT {
return __uncaught_exceptions();
}
-#if defined(_LIBCPP_NO_VCRUNTIME)
+#if !defined(_LIBCPP_ABI_VCRUNTIME)
bad_cast::bad_cast() _NOEXCEPT
{
}
@@ -159,6 +158,6 @@ bad_array_new_length::what() const _NOEXCEPT
{
return "bad_array_new_length";
}
-#endif // _LIBCPP_NO_VCRUNTIME
+#endif // !_LIBCPP_ABI_VCRUNTIME
} // namespace std
diff --git a/src/support/runtime/exception_pointer_cxxabi.ipp b/src/support/runtime/exception_pointer_cxxabi.ipp
index dfac8648c498e..82a8e6972fa36 100644
--- a/src/support/runtime/exception_pointer_cxxabi.ipp
+++ b/src/support/runtime/exception_pointer_cxxabi.ipp
@@ -1,10 +1,9 @@
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
diff --git a/src/support/runtime/exception_pointer_glibcxx.ipp b/src/support/runtime/exception_pointer_glibcxx.ipp
index 9d20dfe486227..3abc137c67ba9 100644
--- a/src/support/runtime/exception_pointer_glibcxx.ipp
+++ b/src/support/runtime/exception_pointer_glibcxx.ipp
@@ -1,10 +1,9 @@
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
diff --git a/src/support/runtime/exception_pointer_msvc.ipp b/src/support/runtime/exception_pointer_msvc.ipp
index 9b0d2361e4028..b1a36952232c9 100644
--- a/src/support/runtime/exception_pointer_msvc.ipp
+++ b/src/support/runtime/exception_pointer_msvc.ipp
@@ -1,10 +1,9 @@
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
diff --git a/src/support/runtime/exception_pointer_unimplemented.ipp b/src/support/runtime/exception_pointer_unimplemented.ipp
index 21c182c85974b..991bca9ecfe3e 100644
--- a/src/support/runtime/exception_pointer_unimplemented.ipp
+++ b/src/support/runtime/exception_pointer_unimplemented.ipp
@@ -1,10 +1,9 @@
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
diff --git a/src/support/runtime/new_handler_fallback.ipp b/src/support/runtime/new_handler_fallback.ipp
index ec3f52354ca87..7205093942976 100644
--- a/src/support/runtime/new_handler_fallback.ipp
+++ b/src/support/runtime/new_handler_fallback.ipp
@@ -1,10 +1,9 @@
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
diff --git a/src/support/runtime/stdexcept_default.ipp b/src/support/runtime/stdexcept_default.ipp
new file mode 100644
index 0000000000000..c827ca4c51304
--- /dev/null
+++ b/src/support/runtime/stdexcept_default.ipp
@@ -0,0 +1,64 @@
+//===--------------------- stdexcept_default.ipp --------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "../../include/refstring.h"
+
+/* For _LIBCPPABI_VERSION */
+#if !defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY) && \
+ (defined(LIBCXX_BUILDING_LIBCXXABI) || defined(LIBCXXRT))
+#include <cxxabi.h>
+#endif
+
+static_assert(sizeof(std::__libcpp_refstring) == sizeof(const char*), "");
+
+namespace std // purposefully not using versioning namespace
+{
+
+logic_error::logic_error(const string& msg) : __imp_(msg.c_str()) {}
+
+logic_error::logic_error(const char* msg) : __imp_(msg) {}
+
+logic_error::logic_error(const logic_error& le) _NOEXCEPT : __imp_(le.__imp_) {}
+
+logic_error& logic_error::operator=(const logic_error& le) _NOEXCEPT {
+ __imp_ = le.__imp_;
+ return *this;
+}
+
+runtime_error::runtime_error(const string& msg) : __imp_(msg.c_str()) {}
+
+runtime_error::runtime_error(const char* msg) : __imp_(msg) {}
+
+runtime_error::runtime_error(const runtime_error& re) _NOEXCEPT
+ : __imp_(re.__imp_) {}
+
+runtime_error& runtime_error::operator=(const runtime_error& re) _NOEXCEPT {
+ __imp_ = re.__imp_;
+ return *this;
+}
+
+#if !defined(_LIBCPPABI_VERSION) && !defined(LIBSTDCXX)
+
+const char* logic_error::what() const _NOEXCEPT { return __imp_.c_str(); }
+
+const char* runtime_error::what() const _NOEXCEPT { return __imp_.c_str(); }
+
+logic_error::~logic_error() _NOEXCEPT {}
+domain_error::~domain_error() _NOEXCEPT {}
+invalid_argument::~invalid_argument() _NOEXCEPT {}
+length_error::~length_error() _NOEXCEPT {}
+out_of_range::~out_of_range() _NOEXCEPT {}
+
+runtime_error::~runtime_error() _NOEXCEPT {}
+range_error::~range_error() _NOEXCEPT {}
+overflow_error::~overflow_error() _NOEXCEPT {}
+underflow_error::~underflow_error() _NOEXCEPT {}
+
+#endif
+
+} // namespace std
diff --git a/src/support/runtime/stdexcept_vcruntime.ipp b/src/support/runtime/stdexcept_vcruntime.ipp
new file mode 100644
index 0000000000000..94eed465ae972
--- /dev/null
+++ b/src/support/runtime/stdexcept_vcruntime.ipp
@@ -0,0 +1,16 @@
+//===------------------- stdexcept_vcruntime.ipp --------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP_ABI_VCRUNTIME
+#error This file may only be used when defering to vcruntime
+#endif
+
+namespace std {
+logic_error::logic_error(std::string const& s) : exception(s.c_str()) {}
+runtime_error::runtime_error(std::string const& s) : exception(s.c_str()) {}
+} // namespace std