xref: /llvm-project/compiler-rt/test/xray/TestCases/Posix/c-test.cpp (revision ef33d6cbfc2dada0709783563fee57e6afd9a2d9)
16db8c59fSFangrui Song // RUN: %clang_xray -g -fxray-modes=xray-basic,xray-fdr,xray-profiling -o %t %s
26db8c59fSFangrui Song // RUN: rm -f xray-log.c-test.*
36db8c59fSFangrui Song // RUN: XRAY_OPTIONS=patch_premain=true:verbosity=1:xray_mode=xray-basic %t \
46db8c59fSFangrui Song // RUN:     2>&1 | FileCheck %s
56db8c59fSFangrui Song // RUN: rm -f xray-log.c-test.*
66db8c59fSFangrui Song //
7*ef33d6cbSWeining Lu // REQUIRES: target={{(aarch64|loongarch64|x86_64)-.*}}
86db8c59fSFangrui Song // REQUIRES: built-in-llvm-tree
always()96db8c59fSFangrui Song __attribute__((xray_always_instrument)) void always() {}
106db8c59fSFangrui Song 
main()116db8c59fSFangrui Song int main() {
126db8c59fSFangrui Song   always();
136db8c59fSFangrui Song }
146db8c59fSFangrui Song 
156db8c59fSFangrui Song // CHECK: =={{[0-9].*}}==XRay: Log file in '{{.*}}'
16