1#include <stdio.h>
2
3int dummy() {
4 printf(format: "Dummy called\n");
5 return 0;
6}
7
8int main(int argc, char **argv) {
9 if (dummy() != 0)
10 return 1;
11 printf(format: "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

source code of bolt/test/runtime/mark-funcs.c