brintos

brintos / llvm-project-archived public Read only

0
0
Text · 647 B · 33c2840 Raw
24 lines · cpp
1// Verify that PLT optimization in BOLT preserves exception-handling info.2 3// REQUIRES: system-linux4 5// RUN: %clang %cflags -fpic -shared -xc /dev/null -o %t.so6// Link against a DSO to ensure PLT entries.7// RUN: %clangxx %cxxflags -O1 -Wl,-q,-znow %s %t.so -o %t.exe8// RUN: llvm-bolt %t.exe -o %t.bolt.exe --plt=all --print-only=.*main.* \9// RUN:   --print-finalized 2>&1 | FileCheck %s10 11// CHECK-LABEL: Binary Function12// CHECK:      adrp {{.*}}__cxa_throw13// CHECK-NEXT: ldr {{.*}}__cxa_throw14// CHECK-NEXT: blr x17 {{.*}} handler: {{.*}} PLTCall:15 16int main() {17  try {18    throw new int;19  } catch (...) {20    return 0;21  }22  return 1;23}24