[compiler-rt] r278164 - [test] Update coverage tests to sync up with r278152
Vedant Kumar via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 9 14:04:22 PDT 2016
Author: vedantk
Date: Tue Aug 9 16:04:22 2016
New Revision: 278164
URL: http://llvm.org/viewvc/llvm-project?rev=278164&view=rev
Log:
[test] Update coverage tests to sync up with r278152
This should fix the following bot failure:
http://lab.llvm.org:8011/builders/clang-ppc64le-linux/builds/6522
Patch by Ying Yi!
Modified:
compiler-rt/trunk/test/profile/Inputs/extern_template.h
compiler-rt/trunk/test/profile/Inputs/instrprof-comdat.h
compiler-rt/trunk/test/profile/Inputs/instrprof-dynamic-a.cpp
compiler-rt/trunk/test/profile/Linux/coverage_ctors.cpp
compiler-rt/trunk/test/profile/Linux/coverage_dtor.cpp
compiler-rt/trunk/test/profile/Linux/coverage_test.cpp
compiler-rt/trunk/test/profile/instrprof-visibility.cpp
Modified: compiler-rt/trunk/test/profile/Inputs/extern_template.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/extern_template.h?rev=278164&r1=278163&r2=278164&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/extern_template.h (original)
+++ compiler-rt/trunk/test/profile/Inputs/extern_template.h Tue Aug 9 16:04:22 2016
@@ -1,10 +1,10 @@
template <typename T> struct Test {
Test() : M(10) {}
- void doIt(int N) { // CHECK: 2| [[@LINE]]| void doIt
- if (N > 10) { // CHECK: 2| [[@LINE]]| if (N > 10) {
- M += 2; // CHECK: 1| [[@LINE]]| M += 2;
- } else // CHECK: 1| [[@LINE]]| } else
- M -= 2; // CHECK: 1| [[@LINE]]| M -= 2;
+ void doIt(int N) { // CHECK: [[@LINE]]| 2| void doIt
+ if (N > 10) { // CHECK: [[@LINE]]| 2| if (N > 10) {
+ M += 2; // CHECK: [[@LINE]]| 1| M += 2;
+ } else // CHECK: [[@LINE]]| 1| } else
+ M -= 2; // CHECK: [[@LINE]]| 1| M -= 2;
}
T M;
};
Modified: compiler-rt/trunk/test/profile/Inputs/instrprof-comdat.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/instrprof-comdat.h?rev=278164&r1=278163&r2=278164&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/instrprof-comdat.h (original)
+++ compiler-rt/trunk/test/profile/Inputs/instrprof-comdat.h Tue Aug 9 16:04:22 2016
@@ -12,12 +12,12 @@ private:
T t;
};
-template <class T> T FOO<T>::DoIt(T ti) { // HEADER: 2| [[@LINE]]|template
- for (T I = 0; I < ti; I++) { // HEADER: 22| [[@LINE]]| for (T
- t += I; // HEADER: 20| [[@LINE]]| t += I;
- if (I > ti / 2) // HEADER: 20| [[@LINE]]| if (I > ti
- t -= 1; // HEADER: 8| [[@LINE]]| t -= 1;
- } // HEADER: 10| [[@LINE]]| }
- // HEADER: 1| [[@LINE]]|
- return t; // HEADER: 1| [[@LINE]]| return t;
+template <class T> T FOO<T>::DoIt(T ti) { // HEADER: [[@LINE]]| 2|template
+ for (T I = 0; I < ti; I++) { // HEADER: [[@LINE]]| 22| for (T
+ t += I; // HEADER: [[@LINE]]| 20| t += I;
+ if (I > ti / 2) // HEADER: [[@LINE]]| 20| if (I > ti
+ t -= 1; // HEADER: [[@LINE]]| 8| t -= 1;
+ } // HEADER: [[@LINE]]| 10| }
+ // HEADER: [[@LINE]]| 1|
+ return t; // HEADER: [[@LINE]]| 1| return t;
}
Modified: compiler-rt/trunk/test/profile/Inputs/instrprof-dynamic-a.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/instrprof-dynamic-a.cpp?rev=278164&r1=278163&r2=278164&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/instrprof-dynamic-a.cpp (original)
+++ compiler-rt/trunk/test/profile/Inputs/instrprof-dynamic-a.cpp Tue Aug 9 16:04:22 2016
@@ -1,7 +1,7 @@
#include "instrprof-dynamic-header.h"
-void a() { // COV: 1| [[@LINE]]|void a
- if (true) { // COV: 1| [[@LINE]]| if
- bar<void>(1); // COV: 1| [[@LINE]]| bar
- bar<char>(1); // COV: 1| [[@LINE]]| bar
- } // COV: 1| [[@LINE]]| }
+void a() { // COV: [[@LINE]]| 1|void a
+ if (true) { // COV: [[@LINE]]| 1| if
+ bar<void>(1); // COV: [[@LINE]]| 1| bar
+ bar<char>(1); // COV: [[@LINE]]| 1| bar
+ } // COV: [[@LINE]]| 1| }
}
Modified: compiler-rt/trunk/test/profile/Linux/coverage_ctors.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Linux/coverage_ctors.cpp?rev=278164&r1=278163&r2=278164&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Linux/coverage_ctors.cpp (original)
+++ compiler-rt/trunk/test/profile/Linux/coverage_ctors.cpp Tue Aug 9 16:04:22 2016
@@ -15,9 +15,9 @@ struct Base {
};
struct Derived : public Base {
- Derived(const Derived &) = default; // CHECK: 2| [[@LINE]]| Derived(const Derived &) = default;
- Derived(Derived &&) = default; // CHECK: 1| [[@LINE]]| Derived(Derived &&) = default;
- Derived() = default; // CHECK: 1| [[@LINE]]| Derived() = default
+ Derived(const Derived &) = default; // CHECK: [[@LINE]]| 2| Derived(const Derived &) = default;
+ Derived(Derived &&) = default; // CHECK: [[@LINE]]| 1| Derived(Derived &&) = default;
+ Derived() = default; // CHECK: [[@LINE]]| 1| Derived() = default
};
Derived dd;
@@ -27,6 +27,6 @@ int main() {
Derived dd4(static_cast<Derived &&>(dd3));
if (dd.B != 0 || dd2.B != 5 || dd3.B != 10 || dd4.B != 20)
- return 1; // CHECK: 0| [[@LINE]]| return 1;
+ return 1; // CHECK: [[@LINE]]| 0| return 1;
return 0;
}
Modified: compiler-rt/trunk/test/profile/Linux/coverage_dtor.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Linux/coverage_dtor.cpp?rev=278164&r1=278163&r2=278164&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Linux/coverage_dtor.cpp (original)
+++ compiler-rt/trunk/test/profile/Linux/coverage_dtor.cpp Tue Aug 9 16:04:22 2016
@@ -12,7 +12,7 @@ struct Base {
struct Derived : public Base {
Derived(int K) : Base(K) {}
- ~Derived() = default; // CHECK: 2| [[@LINE]]| ~Derived() = default;
+ ~Derived() = default; // CHECK: [[@LINE]]| 2| ~Derived() = default;
};
int main() {
@@ -21,6 +21,6 @@ int main() {
Derived dd2(90);
}
if (g != 0)
- return 1; // CHECK: 0| [[@LINE]]| return 1;
+ return 1; // CHECK: [[@LINE]]| 0| return 1;
return 0;
}
Modified: compiler-rt/trunk/test/profile/Linux/coverage_test.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Linux/coverage_test.cpp?rev=278164&r1=278163&r2=278164&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Linux/coverage_test.cpp (original)
+++ compiler-rt/trunk/test/profile/Linux/coverage_test.cpp Tue Aug 9 16:04:22 2016
@@ -17,19 +17,19 @@
// RUN: llvm-profdata merge -o %t.pie.profdata %t.pie.profraw
// RUN: llvm-cov show %t.pie -instr-profile %t.pie.profdata -filename-equivalence 2>&1 | FileCheck %s
-void foo(bool cond) { // CHECK: 1| [[@LINE]]|void foo(
- if (cond) { // CHECK: 1| [[@LINE]]| if (cond) {
- } // CHECK: 0| [[@LINE]]| }
-} // CHECK: 1| [[@LINE]]|}
-void bar() { // CHECK: 1| [[@LINE]]|void bar() {
-} // CHECK: 1| [[@LINE]]|}
-void func() { // CHECK: 0| [[@LINE]]|void func(
-} // CHECK: 0| [[@LINE]]|}
-int main() { // CHECK: 1| [[@LINE]]|int main(
- foo(false); // CHECK: 1| [[@LINE]]| foo(
- bar(); // CHECK: 1| [[@LINE]]| bar(
- return 0; // CHECK: 1| [[@LINE]]| return
-} // CHECK: 1| [[@LINE]]|}
+void foo(bool cond) { // CHECK: [[@LINE]]| 1|void foo(
+ if (cond) { // CHECK: [[@LINE]]| 1| if (cond) {
+ } // CHECK: [[@LINE]]| 0| }
+} // CHECK: [[@LINE]]| 1|}
+void bar() { // CHECK: [[@LINE]]| 1|void bar() {
+} // CHECK: [[@LINE]]| 1|}
+void func() { // CHECK: [[@LINE]]| 0|void func(
+} // CHECK: [[@LINE]]| 0|}
+int main() { // CHECK: [[@LINE]]| 1|int main(
+ foo(false); // CHECK: [[@LINE]]| 1| foo(
+ bar(); // CHECK: [[@LINE]]| 1| bar(
+ return 0; // CHECK: [[@LINE]]| 1| return
+} // CHECK: [[@LINE]]| 1|}
// COVMAP: __llvm_covmap {{.*}}
Modified: compiler-rt/trunk/test/profile/instrprof-visibility.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/instrprof-visibility.cpp?rev=278164&r1=278163&r2=278164&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/instrprof-visibility.cpp (original)
+++ compiler-rt/trunk/test/profile/instrprof-visibility.cpp Tue Aug 9 16:04:22 2016
@@ -56,34 +56,34 @@ int main() {
// --- Check coverage for functions in the anonymous namespace.
// COV-DAG: instrprof-visibility.cpp:_ZN12_GLOBAL__N_14callEv
-// COV-DAG: 1|{{.*}}|void call() {
-// COV-DAG: 1|{{.*}}| f1();
-// COV-DAG: 1|{{.*}}|#ifndef NO_WEAK
-// COV-DAG: |{{.*}}| f2();
-// COV-DAG: |{{.*}}|#endif
-// COV-DAG: 1|{{.*}}| f3();
-// COV-DAG: 1|{{.*}}|#ifndef NO_EXTERN
-// COV-DAG: |{{.*}}| f4();
-// COV-DAG: |{{.*}}|#endif
-// COV-DAG: 1|{{.*}}| f5();
-// COV-DAG: 1|{{.*}}| f6();
-// COV-DAG: 1|{{.*}}| f7();
-// COV-DAG: 1|{{.*}}|}
+// COV-DAG: [[CALL:[0-9]+]]|{{ *}}1|void call() {
+// COV-DAG: {{.*}}|{{ *}}1| f1();
+// COV-DAG: {{.*}}|{{ *}}1|#ifndef NO_WEAK
+// COV-DAG: {{.*}}|{{ *}} | f2();
+// COV-DAG: {{.*}}|{{ *}} |#endif
+// COV-DAG: {{.*}}|{{ *}}1| f3();
+// COV-DAG: {{.*}}|{{ *}}1|#ifndef NO_EXTERN
+// COV-DAG: {{.*}}|{{ *}} | f4();
+// COV-DAG: {{.*}}|{{ *}} |#endif
+// COV-DAG: {{.*}}|{{ *}}1| f5();
+// COV-DAG: {{.*}}|{{ *}}1| f6();
+// COV-DAG: {{.*}}|{{ *}}1| f7();
+// COV-DAG: {{.*}}|{{ *}}1|}
// --- Check coverage for functions in namespace N1.
// COV-DAG: _ZN2N14callEv
-// COV-DAG: 1|{{.*}}|void call() {
-// COV-DAG: 1|{{.*}}| f1();
-// COV-DAG: 1|{{.*}}|#ifndef NO_WEAK
-// COV-DAG: 1|{{.*}}| f2();
-// COV-DAG: 1|{{.*}}|#endif
-// COV-DAG: 1|{{.*}}| f3();
-// COV-DAG: 1|{{.*}}|#ifndef NO_EXTERN
-// COV-DAG: 1|{{.*}}| f4();
-// COV-DAG: 1|{{.*}}|#endif
-// COV-DAG: 1|{{.*}}| f5();
-// COV-DAG: 1|{{.*}}| f6();
-// COV-DAG: 1|{{.*}}| f7();
-// COV-DAG: 1|{{.*}}|}
+// COV-DAG: {{ *}}[[CALL]]|{{ *}}1|void call() {
+// COV-DAG: {{.*}}|{{ *}}1| f1();
+// COV-DAG: {{.*}}|{{ *}}1|#ifndef NO_WEAK
+// COV-DAG: {{.*}}|{{ *}}1| f2();
+// COV-DAG: {{.*}}|{{ *}}1|#endif
+// COV-DAG: {{.*}}|{{ *}}1| f3();
+// COV-DAG: {{.*}}|{{ *}}1|#ifndef NO_EXTERN
+// COV-DAG: {{.*}}|{{ *}}1| f4();
+// COV-DAG: {{.*}}|{{ *}}1|#endif
+// COV-DAG: {{.*}}|{{ *}}1| f5();
+// COV-DAG: {{.*}}|{{ *}}1| f6();
+// COV-DAG: {{.*}}|{{ *}}1| f7();
+// COV-DAG: {{.*}}|{{ *}}1|}
// COV-DAG: instrprof-visibility.cpp
More information about the llvm-commits
mailing list