1 | // Verify that PLT optimization in BOLT preserves exception-handling info. |
---|---|
2 | |
3 | // REQUIRES: system-linux |
4 | |
5 | // RUN: %clang %cflags -fpic -shared -xc /dev/null -o %t.so |
6 | // Link against a DSO to ensure PLT entries. |
7 | // RUN: %clangxx %cxxflags -O1 -Wl,-q,-znow %s %t.so -o %t.exe |
8 | // RUN: llvm-bolt %t.exe -o %t.bolt.exe --plt=all |
9 | // RUN: %t.bolt.exe |
10 | |
11 | int main() { |
12 | try { |
13 | throw new int; |
14 | } catch (...) { |
15 | return 0; |
16 | } |
17 | return 1; |
18 | } |
19 |