1 #include <stdio.h>
2
dummy()3 int dummy() {
4 printf("Dummy called\n");
5 return 0;
6 }
7
main(int argc,char ** argv)8 int main(int argc, char **argv) {
9 if (dummy() != 0)
10 return 1;
11 printf("Main called\n");
12 return 0;
13 }
14 // Check that emitting trap value works properly and
15 // does not break functions
16 // REQUIRES: system-linux
17 // RUN: %clangxx -Wl,-q %s -o %t.exe
18 // RUN: %t.exe | FileCheck %s
19 // CHECK: Dummy called
20 // CHECK-NEXT: Main called
21 // RUN: llvm-bolt %t.exe -o %t.exe.bolt -lite=false --mark-funcs
22 // RUN: %t.exe.bolt | FileCheck %s
23