1// REQUIRES: libunwind-available
2// RUN: %clangxx -fexceptions -fPIC -c -o %t %s
3// RUN: env LD_PRELOAD=%shared_libunwind %llvm_jitlink %t
4
5extern "C" void llvm_jitlink_setTestResultOverride(long Value);
6
7int main(int argc, char *argv[]) {
8 llvm_jitlink_setTestResultOverride(Value: 1);
9 try {
10 throw 0;
11 } catch (int X) {
12 llvm_jitlink_setTestResultOverride(Value: X);
13 }
14 return 0;
15}
16

source code of compiler-rt/test/orc/TestCases/Linux/ppc64/ehframe-libunwind.cpp