Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / xray / TestCases / Posix / quiet-start.cpp
blob48830017047c0d33efa66a690415dc0cfe53eaa8
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
11 // REQUIRES: built-in-llvm-tree
13 #include <iostream>
15 using namespace std;
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!