SamplePGO - Sort samples by source location when emitting as text.
When dumping function samples or writing them out as text format, it
helps if the samples are emitted sorted by source location. The sorting
of the maps is a bit slow, so we only do it on demand.
llvm-svn: 253568
diff --git a/llvm/test/tools/llvm-profdata/gcc-gcov-sample-profile.test b/llvm/test/tools/llvm-profdata/gcc-gcov-sample-profile.test
index 609569a..dbcc74e 100644
--- a/llvm/test/tools/llvm-profdata/gcc-gcov-sample-profile.test
+++ b/llvm/test/tools/llvm-profdata/gcc-gcov-sample-profile.test
@@ -11,8 +11,8 @@
SHOW1: Function: main: 364084, 0, 6 sampled lines
SHOW1: 2.3: inlined callee: _Z3fool: 243786, 0, 3 sampled lines
SHOW1: 1.3: inlined callee: _Z3bari: 0, 0, 2 sampled lines
-SHOW1: 1.8: inlined callee: _Z3bari: 0, 0, 2 sampled lines
SHOW1: 1.7: inlined callee: _Z3bari: 98558, 0, 2 sampled lines
+SHOW1: 1.8: inlined callee: _Z3bari: 0, 0, 2 sampled lines
2- Convert the profile to text encoding and check that they are both
identical.