llvm-project
24 строки · 962.0 Байт
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-exception
6//
7//===----------------------------------------------------------------------===//
8
9// UNSUPPORTED: c++03
10
11#include "assert_macros.h"
12#include "concat_macros.h"
13#include "../src/cxa_exception.h"
14
15int main(int, char**) {
16void* globals = __cxxabiv1::__cxa_get_globals();
17TEST_REQUIRE(globals != nullptr, TEST_WRITE_CONCATENATED("Got null result from __cxa_get_globals"));
18
19void* fast_globals = __cxxabiv1::__cxa_get_globals_fast();
20TEST_REQUIRE(globals == fast_globals, TEST_WRITE_CONCATENATED("__cxa_get_globals returned ", globals,
21" but __cxa_get_globals_fast returned ", fast_globals));
22
23return 0;
24}
25