brintos

brintos / llvm-project-archived public Read only

0
0
Text · 908 B · 0ae015d Raw
29 lines · cpp
1//===----------------------------------------------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9// REQUIRES: no-exceptions10 11#include <cxxabi.h>12#include <exception>13#include <cassert>14 15// namespace __cxxabiv1 {16//      void *__cxa_current_primary_exception() throw();17//      extern bool          __cxa_uncaught_exception () throw();18//      extern unsigned int  __cxa_uncaught_exceptions() throw();19// }20 21int main ()22{23    // Trivially24    assert(nullptr == __cxxabiv1::__cxa_current_primary_exception());25    assert(!__cxxabiv1::__cxa_uncaught_exception());26    assert(0 == __cxxabiv1::__cxa_uncaught_exceptions());27    return 0;28}29