16db8c59fSFangrui Song // Make sure that we don't get the inmemory logging implementation enabled when 26db8c59fSFangrui Song // we turn it off via options. 36db8c59fSFangrui Song 46db8c59fSFangrui Song // RUN: %clangxx_xray -std=c++11 %s -o %t 5*02cdbc34SFangrui Song // RUN: XRAY_OPTIONS="patch_premain=true verbosity=1 xray_logfile_base=optional-inmemory-log.xray-" %run %t 2>&1 | FileCheck %s 66db8c59fSFangrui Song // 76db8c59fSFangrui Song // Make sure we clean out the logs in case there was a bug. 86db8c59fSFangrui Song // 96db8c59fSFangrui Song // RUN: rm -f optional-inmemory-log.xray-* 106db8c59fSFangrui Song 116db8c59fSFangrui Song // UNSUPPORTED: target-is-mips64,target-is-mips64el 126db8c59fSFangrui Song 136db8c59fSFangrui Song #include <cstdio> 146db8c59fSFangrui Song foo()156db8c59fSFangrui Song[[clang::xray_always_instrument]] void foo() { 166db8c59fSFangrui Song printf("foo() is always instrumented!"); 176db8c59fSFangrui Song } 186db8c59fSFangrui Song main()196db8c59fSFangrui Songint main() { 206db8c59fSFangrui Song // CHECK-NOT: XRay: Log file in 'optional-inmemory-log.xray-{{.*}}' 216db8c59fSFangrui Song foo(); 226db8c59fSFangrui Song // CHECK: foo() is always instrumented! 236db8c59fSFangrui Song } 24