xref: /llvm-project/compiler-rt/test/xray/TestCases/Posix/c-test.cpp (revision ef33d6cbfc2dada0709783563fee57e6afd9a2d9)
1 // RUN: %clang_xray -g -fxray-modes=xray-basic,xray-fdr,xray-profiling -o %t %s
2 // RUN: rm -f xray-log.c-test.*
3 // RUN: XRAY_OPTIONS=patch_premain=true:verbosity=1:xray_mode=xray-basic %t \
4 // RUN:     2>&1 | FileCheck %s
5 // RUN: rm -f xray-log.c-test.*
6 //
7 // REQUIRES: target={{(aarch64|loongarch64|x86_64)-.*}}
8 // REQUIRES: built-in-llvm-tree
always()9 __attribute__((xray_always_instrument)) void always() {}
10 
main()11 int main() {
12   always();
13 }
14 
15 // CHECK: =={{[0-9].*}}==XRay: Log file in '{{.*}}'
16