Kamil Rytarowski | 80c2a79 | 2018-02-22 06:08:26 +0000 | [diff] [blame] | 1 | // Make sure that we don't get the inmemory logging implementation enabled when |
| 2 | // we turn it off via options. |
| 3 | |
| 4 | // RUN: %clangxx_xray -std=c++11 %s -o %t |
| 5 | // RUN: XRAY_OPTIONS="patch_premain=true verbosity=1 xray_naive_log=false xray_logfile_base=optional-inmemory-log.xray-" %run %t 2>&1 | FileCheck %s |
| 6 | // |
| 7 | // Make sure we clean out the logs in case there was a bug. |
| 8 | // |
| 9 | // RUN: rm -f optional-inmemory-log.xray-* |
| 10 | |
| 11 | // UNSUPPORTED: target-is-mips64,target-is-mips64el |
| 12 | |
| 13 | #include <cstdio> |
| 14 | |
| 15 | [[clang::xray_always_instrument]] void foo() { |
| 16 | printf("foo() is always instrumented!"); |
| 17 | } |
| 18 | |
| 19 | int main() { |
| 20 | // CHECK-NOT: XRay: Log file in 'optional-inmemory-log.xray-{{.*}}' |
| 21 | foo(); |
| 22 | // CHECK: foo() is always instrumented! |
| 23 | } |