[PGO] Refactor profile dumping function for ease of adding other profile kind

Refactor the dumping function so that we can add other value profile kind easily.

Differential Revision: https://reviews.llvm.org/D30752

llvm-svn: 297399
diff --git a/llvm/test/tools/llvm-profdata/value-prof.proftext b/llvm/test/tools/llvm-profdata/value-prof.proftext
index e35efbf..31a7698 100644
--- a/llvm/test/tools/llvm-profdata/value-prof.proftext
+++ b/llvm/test/tools/llvm-profdata/value-prof.proftext
@@ -46,13 +46,13 @@
 foo2:20000
 
 #ICTXT: Indirect Call Site Count: 3
-#ICTXT-NEXT:    Indirect Target Results: 
+#ICTXT-NEXT:    Indirect Target Results:
 #ICTXT-NEXT:	[ 1, foo, 100 ]
 #ICTXT-NEXT:	[ 1, foo2, 1000 ]
 #ICTXT-NEXT:	[ 2, foo2, 20000 ]
 
 #IC: Indirect Call Site Count: 3
-#IC-NEXT:    Indirect Target Results: 
+#IC-NEXT:    Indirect Target Results:
 #IC-NEXT:	[ 1, foo2, 1000 ]
 #IC-NEXT:	[ 1, foo, 100 ]
 #IC-NEXT:	[ 2, foo2, 20000 ]
@@ -72,10 +72,10 @@
 999000
 359800
 
-#ICSUM: Total Number of Indirect Call Sites : 3
-#ICSUM: Total Number of Sites With Values : 2
-#ICSUM: Total Number of Profiled Values : 3
+#ICSUM: Statistics for indirect call sites profile:
+#ICSUM: Total number of sites: 3
+#ICSUM: Total number of sites with values: 2
+#ICSUM: Total number of profiled values: 3
 #ICSUM:	NumTargets, SiteCount
-#ICSUM	1, 1
-#ICSUM	2, 1
-
+#ICSUM	  1, 1
+#ICSUM	  2, 1