aboutsummaryrefslogtreecommitdiff
path: root/test/profile/instrprof-gcov-exceptions.test
blob: 073200e6c4ea6e7a340da72944107f82c58e6b0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
RUN: mkdir -p %t.d
RUN: cd %t.d

# Test with exceptions disabled.
RUN: %clangxx --coverage -o %t %S/Inputs/instrprof-gcov-exceptions.cpp -fno-exceptions
RUN: test -f instrprof-gcov-exceptions.gcno

RUN: rm -f instrprof-gcov-exceptions.gcda
RUN: %run %t
RUN: llvm-cov gcov instrprof-gcov-exceptions.gcda
RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-gcov-exceptions.cpp.gcov %S/Inputs/instrprof-gcov-exceptions.cpp.gcov

# Test with exceptions enabled, the result in terms of line counts should be the same.
RUN: %clangxx --coverage -o %t %S/Inputs/instrprof-gcov-exceptions.cpp
RUN: test -f instrprof-gcov-exceptions.gcno

RUN: rm -f instrprof-gcov-exceptions.gcda
RUN: %run %t
RUN: llvm-cov gcov instrprof-gcov-exceptions.gcda
RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-gcov-exceptions.cpp.gcov %S/Inputs/instrprof-gcov-exceptions.cpp.gcov