[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / Misc / time-passes.c
blobc476bccaea43941d7125a0fc96d68f082d1eca70
1 // Check that legacy pass manager could only use -ftime-report
2 // RUN: %clang_cc1 -flegacy-pass-manager -emit-obj -O1 \
3 // RUN: -ftime-report %s -o /dev/null 2>&1 | \
4 // RUN: FileCheck %s --check-prefixes=TIME,LPM
5 // RUN: not %clang_cc1 -flegacy-pass-manager -emit-obj -O1 \
6 // RUN: -ftime-report=per-pass %s -o /dev/null 2>&1 | \
7 // RUN: FileCheck %s --check-prefixes=ERROR
8 // RUN: not %clang_cc1 -flegacy-pass-manager -emit-obj -O1 \
9 // RUN: -ftime-report=per-pass-run %s -o /dev/null 2>&1 | \
10 // RUN: FileCheck %s --check-prefixes=ERROR
12 // Check -ftime-report/-ftime-report= output for the new pass manager
13 // RUN: %clang_cc1 -emit-obj -O1 -fno-legacy-pass-manager \
14 // RUN: -ftime-report %s -o /dev/null 2>&1 | \
15 // RUN: FileCheck %s --check-prefixes=TIME,NPM
16 // RUN: %clang_cc1 -emit-obj -O1 -fno-legacy-pass-manager \
17 // RUN: -ftime-report=per-pass %s -o /dev/null 2>&1 | \
18 // RUN: FileCheck %s --check-prefixes=TIME,NPM
19 // RUN: %clang_cc1 -emit-obj -O1 -fno-legacy-pass-manager \
20 // RUN: -ftime-report=per-pass-run %s -o /dev/null 2>&1 | \
21 // RUN: FileCheck %s --check-prefixes=TIME,NPM-PER-INVOKE
23 // TIME: Pass execution timing report
24 // TIME: Total Execution Time:
25 // TIME: Name
26 // LPM-DAG: Dominator Tree Construction #
27 // LPM-DAG: Dominator Tree Construction #
28 // LPM-DAG: Dominator Tree Construction #
29 // NPM-PER-INVOKE-DAG: InstCombinePass #
30 // NPM-PER-INVOKE-DAG: InstCombinePass #
31 // NPM-PER-INVOKE-DAG: InstCombinePass #
32 // NPM-NOT: InstCombinePass #
33 // NPM: InstCombinePass{{$}}
34 // NPM-NOT: InstCombinePass #
35 // TIME: Total{{$}}
36 // LPM-NOT: Pass execution timing report
37 // NPM: Pass execution timing report
39 // ERROR: error: invalid argument '-ftime-report={{.*}}' only allowed with '-fno-legacy-pass-manager'
41 int foo(int x, int y) { return x + y; }