1*eb8650a7SLouis Dionne //===----------------------------------------------------------------------===// 257e446daSAsiri Rathnayake // 357b08b09SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 457b08b09SChandler Carruth // See https://llvm.org/LICENSE.txt for license information. 557b08b09SChandler Carruth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 657e446daSAsiri Rathnayake // 757e446daSAsiri Rathnayake //===----------------------------------------------------------------------===// 857e446daSAsiri Rathnayake 98c61114cSLouis Dionne // REQUIRES: no-exceptions 1057e446daSAsiri Rathnayake 1157e446daSAsiri Rathnayake #include <cxxabi.h> 1257e446daSAsiri Rathnayake #include <exception> 1357e446daSAsiri Rathnayake #include <cassert> 1457e446daSAsiri Rathnayake 1557e446daSAsiri Rathnayake // namespace __cxxabiv1 { 1657e446daSAsiri Rathnayake // void *__cxa_current_primary_exception() throw(); 1757e446daSAsiri Rathnayake // extern bool __cxa_uncaught_exception () throw(); 1857e446daSAsiri Rathnayake // extern unsigned int __cxa_uncaught_exceptions() throw(); 1957e446daSAsiri Rathnayake // } 2057e446daSAsiri Rathnayake main()2157e446daSAsiri Rathnayakeint main () 2257e446daSAsiri Rathnayake { 2357e446daSAsiri Rathnayake // Trivially 2457e446daSAsiri Rathnayake assert(nullptr == __cxxabiv1::__cxa_current_primary_exception()); 2557e446daSAsiri Rathnayake assert(!__cxxabiv1::__cxa_uncaught_exception()); 2657e446daSAsiri Rathnayake assert(0 == __cxxabiv1::__cxa_uncaught_exceptions()); 2757e446daSAsiri Rathnayake return 0; 2857e446daSAsiri Rathnayake } 29