xref: /llvm-project/bolt/test/runtime/X86/exceptions-pic.test (revision 0224bdce9263b74806b94426b33e97e030ab7a79)
1# Verify that C++ exceptions work after binary re-writing
2
3REQUIRES: x86_64-linux
4
5RUN: %clangxx -fpic -Wl,-q %S/Inputs/exception4.cpp -o %t.pic
6
7RUN: llvm-bolt %t.pic -o %t
8RUN: %t 2>&1 | FileCheck %s
9
10RUN: llvm-bolt --relocs --use-old-text %t.pic -o %t
11RUN: %t 2>&1 | FileCheck %s
12
13RUN: llvm-bolt %t.pic -o %t --split-functions --split-strategy=all --split-eh
14RUN: %t 2>&1 | FileCheck %s
15
16CHECK: catch 2
17CHECK-NEXT: catch 1
18CHECK-NEXT: caught ExcC
19