zig/lib/libcxx/src/exception.cpp
Andrew Kelley 06ee65af9e libcxx: update to LLVM 18
release/18.x branch, commit 78b99c73ee4b96fe9ce0e294d4632326afb2db42

This adds the flag `-D_LIBCPP_HARDENING_MODE` which is determined based
on the Zig optimization mode.

This commit also fixes libunwind, libcxx, and libcxxabi to properly
report sub compilation errors.
2024-05-08 19:37:29 -07:00

36 lines
1.3 KiB
C++
Vendored

//===----------------------------------------------------------------------===//
//
// 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 <exception>
#include <new>
#include <typeinfo>
#if defined(LIBCXXRT) || defined(LIBCXX_BUILDING_LIBCXXABI)
# include <cxxabi.h>
using namespace __cxxabiv1;
# define HAVE_DEPENDENT_EH_ABI 1
#endif
#if defined(_LIBCPP_ABI_MICROSOFT)
# include "support/runtime/exception_msvc.ipp"
# include "support/runtime/exception_pointer_msvc.ipp"
#elif defined(_LIBCPPABI_VERSION)
# include "support/runtime/exception_libcxxabi.ipp"
# include "support/runtime/exception_pointer_cxxabi.ipp"
#elif defined(LIBCXXRT)
# include "support/runtime/exception_libcxxrt.ipp"
# include "support/runtime/exception_pointer_cxxabi.ipp"
#elif defined(__GLIBCXX__)
# include "support/runtime/exception_glibcxx.ipp"
# include "support/runtime/exception_pointer_glibcxx.ipp"
#else
# include "include/atomic_support.h"
# include "support/runtime/exception_fallback.ipp"
# include "support/runtime/exception_pointer_unimplemented.ipp"
#endif