| 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 | // Test that libunwind loads successfully independently of libc++abi with |
| 10 | // runtime linking on AIX. |
| 11 | |
| 12 | // REQUIRES: target={{.+}}-aix{{.*}} |
| 13 | // ADDITIONAL_COMPILE_FLAGS: -Wl,-brtl |
| 14 | |
| 15 | #include <unwind.h> |
| 16 | extern "C" int printf(const char *, ...); |
| 17 | int main(void) { |
| 18 | void *fp = (void *)&_Unwind_Backtrace; |
| 19 | printf("%p\n" , fp); |
| 20 | } |
| 21 | |