[clang-tidy][modernize-use-starts-ends-with] Fix operator rewriting false negative...
[llvm-project.git] / clang / test / Misc / time-passes.c
blob395da216aad426ee1b95bc2935e2c3f513a39463
1 // Check -ftime-report/-ftime-report= output
2 // RUN: %clang_cc1 -emit-obj -O1 \
3 // RUN: -ftime-report %s -o /dev/null 2>&1 | \
4 // RUN: FileCheck %s --check-prefixes=TIME,NPM
5 // RUN: %clang_cc1 -emit-obj -O1 \
6 // RUN: -ftime-report=per-pass %s -o /dev/null 2>&1 | \
7 // RUN: FileCheck %s --check-prefixes=TIME,NPM
8 // RUN: %clang_cc1 -emit-obj -O1 \
9 // RUN: -ftime-report=per-pass-run %s -o /dev/null 2>&1 | \
10 // RUN: FileCheck %s --check-prefixes=TIME,NPM-PER-INVOKE
12 // TIME: Pass execution timing report
13 // TIME: Total Execution Time:
14 // TIME: Name
15 // NPM-PER-INVOKE-DAG: InstCombinePass #
16 // NPM-PER-INVOKE-DAG: InstCombinePass #
17 // NPM-PER-INVOKE-DAG: InstCombinePass #
18 // NPM-NOT: InstCombinePass #
19 // NPM: InstCombinePass{{$}}
20 // NPM-NOT: InstCombinePass #
21 // TIME: Total{{$}}
22 // NPM: Pass execution timing report
24 int foo(int x, int y) { return x + y; }