[PATCH] D49721: [profile] Fix tests in compiler-rt for patch in gcov (https://reviews.llvm.org/D49659)

calixte via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 5 02:30:54 PDT 2018


calixte updated this revision to Diff 163988.
calixte added a comment.

Fix switch test.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D49721

Files:
  test/profile/Inputs/instrprof-gcov-exceptions.cpp.gcov
  test/profile/Inputs/instrprof-gcov-switch1.c.gcov
  test/profile/Inputs/instrprof-gcov-switch2.c.gcov
  test/profile/Inputs/instrprof-shared-main.c.gcov
  test/profile/instrprof-gcov-multiple-bbs-single-line.test


Index: test/profile/instrprof-gcov-multiple-bbs-single-line.test
===================================================================
--- test/profile/instrprof-gcov-multiple-bbs-single-line.test
+++ test/profile/instrprof-gcov-multiple-bbs-single-line.test
@@ -1,5 +1,3 @@
-XFAIL: *
-
 RUN: mkdir -p %t.d
 RUN: cd %t.d
 
Index: test/profile/Inputs/instrprof-shared-main.c.gcov
===================================================================
--- test/profile/Inputs/instrprof-shared-main.c.gcov
+++ test/profile/Inputs/instrprof-shared-main.c.gcov
@@ -8,8 +8,8 @@
 // CHECK-NEXT:        -:    3:
 // CHECK-NEXT:        -:    4:int main() {
 // CHECK-NEXT:        -:    5:  int i, j;
-// CHECK-NEXT:     2002:    6:  for (i = 0; i < 1000; i++)
-// CHECK-NEXT:  2002000:    7:    for (j = 0; j < 1000; j++)
+// CHECK-NEXT:     1001:    6:  for (i = 0; i < 1000; i++)
+// CHECK-NEXT:  1001000:    7:    for (j = 0; j < 1000; j++)
 // CHECK-NEXT:  1001000:    8:      foo(i * j);
 // CHECK-NEXT:        -:    9:
 // CHECK-NEXT:        1:   10:  if (g2 - g1 == 280001)
Index: test/profile/Inputs/instrprof-gcov-switch2.c.gcov
===================================================================
--- test/profile/Inputs/instrprof-gcov-switch2.c.gcov
+++ test/profile/Inputs/instrprof-gcov-switch2.c.gcov
@@ -5,19 +5,19 @@
 // CHECK-NEXT:        -:    0:Programs:1
 // CHECK-NEXT:        -:    1:int main(void)
 // CHECK-NEXT:        -:    2:{
-// CHECK-NEXT:        3:    3:  int i = 22;
+// CHECK-NEXT:        1:    3:  int i = 22;
 // CHECK-NEXT:        -:    4:
-// CHECK-NEXT:        3:    5:  switch (i) {
+// CHECK-NEXT:        1:    5:  switch (i) {
 // CHECK-NEXT:        -:    6:    case 7:
 // CHECK-NEXT:    #####:    7:      break;
 // CHECK-NEXT:        -:    8:
 // CHECK-NEXT:        -:    9:    case 22:
 // CHECK-NEXT:        1:   10:      i = 7;
 // CHECK-NEXT:        -:   11:
 // CHECK-NEXT:        -:   12:    case 42:
-// CHECK-NEXT:        1:   13:      i = 22;
-// CHECK-NEXT:        1:   14:      break;
+// CHECK-NEXT:        2:   13:      i = 22;
+// CHECK-NEXT:        2:   14:      break;
 // CHECK-NEXT:        -:   15:  }
 // CHECK-NEXT:        -:   16:
-// CHECK-NEXT:        1:   17:  return 0;
+// CHECK-NEXT:        2:   17:  return 0;
 // CHECK-NEXT:        -:   18:}
Index: test/profile/Inputs/instrprof-gcov-switch1.c.gcov
===================================================================
--- test/profile/Inputs/instrprof-gcov-switch1.c.gcov
+++ test/profile/Inputs/instrprof-gcov-switch1.c.gcov
@@ -5,9 +5,9 @@
 // CHECK-NEXT:        -:    0:Programs:1
 // CHECK-NEXT:        -:    1:int main(void)
 // CHECK-NEXT:        -:    2:{
-// CHECK-NEXT:        2:    3:  int i = 22;
+// CHECK-NEXT:        1:    3:  int i = 22;
 // CHECK-NEXT:        -:    4:
-// CHECK-NEXT:        2:    5:  switch (i) {
+// CHECK-NEXT:        1:    5:  switch (i) {
 // CHECK-NEXT:        -:    6:    case 7:
 // CHECK-NEXT:    #####:    7:      break;
 // CHECK-NEXT:        -:    8:
@@ -19,5 +19,5 @@
 // CHECK-NEXT:    #####:   14:      break;
 // CHECK-NEXT:        -:   15:  }
 // CHECK-NEXT:        -:   16:
-// CHECK-NEXT:        1:   17:  return 0;
+// CHECK-NEXT:        2:   17:  return 0;
 // CHECK-NEXT:        -:   18:}
Index: test/profile/Inputs/instrprof-gcov-exceptions.cpp.gcov
===================================================================
--- test/profile/Inputs/instrprof-gcov-exceptions.cpp.gcov
+++ test/profile/Inputs/instrprof-gcov-exceptions.cpp.gcov
@@ -6,7 +6,7 @@
 // CHECK-NEXT:        -:    1:#include <string>
 // CHECK-NEXT:        -:    2:
 // CHECK-NEXT:        -:    3:void asd(std::string i) {
-// CHECK-NEXT:        2:    4:}
+// CHECK-NEXT:        1:    4:}
 // CHECK-NEXT:        -:    5:
 // CHECK-NEXT:        -:    6:int main(void)
 // CHECK-NEXT:        -:    7:{


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49721.163988.patch
Type: text/x-patch
Size: 3830 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180905/c8fefed4/attachment.bin>


More information about the llvm-commits mailing list