Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / xray / TestCases / Posix / fixedsize-logging.cpp
blobe4462c8b45ef72ff0f86b88a9818dbceec4aa45d
1 // Check to make sure that we have a log file with a fixed-size.
3 // RUN: %clangxx_xray -std=c++11 %s -o %t
4 // RUN: XRAY_OPTIONS="patch_premain=true xray_mode=xray-basic verbosity=1 xray_logfile_base=fixedsize-logging-" %run %t 2>&1 | FileCheck %s
5 //
6 // After all that, clean up the output xray log.
7 //
8 // RUN: rm fixedsize-logging-*
10 // UNSUPPORTED: target-is-mips64,target-is-mips64el
12 #include <cstdio>
14 [[clang::xray_always_instrument]] void foo() {
15 printf("foo() is always instrumented!");
18 int main() {
19 // CHECK: XRay: Log file in 'fixedsize-logging-{{.*}}'
20 foo();
21 // CHECK: foo() is always instrumented!