llvm-project/bolt/test/runtime/mark-funcs.c
Denis Revunov 82ed7896cf [BOLT] Add test for emitting trap value
Reviewed By: rafauler

Differential Revision: https://reviews.llvm.org/D158191
2023-08-24 01:30:02 +03:00

23 lines
510 B
C

#include <stdio.h>
int dummy() {
printf("Dummy called\n");
return 0;
}
int main(int argc, char **argv) {
if (dummy() != 0)
return 1;
printf("Main called\n");
return 0;
}
// Check that emitting trap value works properly and
// does not break functions
// REQUIRES: system-linux
// RUN: %clangxx -Wl,-q %s -o %t.exe
// RUN: %t.exe | FileCheck %s
// CHECK: Dummy called
// CHECK-NEXT: Main called
// RUN: llvm-bolt %t.exe -o %t.exe.bolt -lite=false --mark-funcs
// RUN: %t.exe.bolt | FileCheck %s