1 // FIXME: UNSUPPORTED as currently it cannot be built by lit properly.
3 // RUN: %clangxx_builtins %s %librt -o %t && %run %t
8 extern void foo_clean(void* x
);
9 extern void bar_clean(void* x
);
10 extern void register_foo_local(int* x
);
11 extern void register_bar_local(int* x
);
12 extern void done_foo();
13 extern void done_bar();
17 * foo() is called by main() in gcc_personality_test_helper.cxx.
18 * done_bar() is implemented in C++ and will throw an exception.
19 * main() will catch the exception and verify that the cleanup
20 * routines for foo() and bar() were called by the personality
25 int x
__attribute__((cleanup(bar_clean
))) = 0;
26 register_bar_local(&x
);
31 int x
__attribute__((cleanup(foo_clean
))) = 0;
32 register_foo_local(&x
);