1 //===----------------------------------------------------------------------===//
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-exception
7 //===----------------------------------------------------------------------===//
11 #include "assert_macros.h"
12 #include "concat_macros.h"
13 #include "../src/cxa_exception.h"
15 int main(int, char**) {
16 void* globals
= __cxxabiv1::__cxa_get_globals();
17 TEST_REQUIRE(globals
!= nullptr, TEST_WRITE_CONCATENATED("Got null result from __cxa_get_globals"));
19 void* fast_globals
= __cxxabiv1::__cxa_get_globals_fast();
20 TEST_REQUIRE(globals
== fast_globals
, TEST_WRITE_CONCATENATED("__cxa_get_globals returned ", globals
,
21 " but __cxa_get_globals_fast returned ", fast_globals
));