1// RUN: %clangxx -c -o %t %s
2// RUN: %llvm_jitlink -slab-allocate=20Mb %t
3//
4// REQUIRES: system-darwin && host-arch-compatible
5
6// Test that trivial throw / catch works.
7int main(int argc, char *argv[]) {
8 try {
9 throw 42;
10 } catch (int E) {
11 return 42 - E;
12 }
13 return 1;
14}
15

source code of compiler-rt/test/orc/TestCases/Darwin/Generic/exceptions.cpp