1 | // Ensure that we have a quiet startup when we don't have the XRay |
2 | // instrumentation sleds. |
3 | // |
4 | // RUN: %clangxx -std=c++11 %s -o %t %xraylib |
5 | // RUN: XRAY_OPTIONS="patch_premain=true verbosity=1" %run %t 2>&1 | \ |
6 | // RUN: FileCheck %s --check-prefix NOISY |
7 | // RUN: XRAY_OPTIONS="patch_premain=true verbosity=0" %run %t 2>&1 | \ |
8 | // RUN: FileCheck %s --check-prefix QUIET |
9 | // RUN: XRAY_OPTIONS="" %run %t 2>&1 | FileCheck %s --check-prefix DEFAULT |
10 | |
11 | // REQUIRES: built-in-llvm-tree |
12 | |
13 | #include <iostream> |
14 | |
15 | using namespace std; |
16 | |
17 | int main(int, char**) { |
18 | // NOISY: {{.*}}XRay instrumentation map missing. Not initializing XRay. |
19 | // QUIET-NOT: {{.*}}XRay instrumentation map missing. Not initializing XRay. |
20 | // DEFAULT-NOT: {{.*}}XRay instrumentation map missing. Not initializing XRay. |
21 | cout << "Hello, XRay!" << endl; |
22 | // NOISY: Hello, XRay! |
23 | // QUIET: Hello, XRay! |
24 | // DEFAULT: Hello, XRay! |
25 | } |
26 | |