[PGO] Handle and report overflow during profile merge for all types of data
Summary: Surface counter overflow when merging profile data. Merging still occurs on overflow but counts saturate to the maximum representable value. Overflow is reported to the user.
Reviewers: davidxl, dnovillo, silvas
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D15547
llvm-svn: 255825
diff --git a/llvm/test/tools/llvm-profdata/Inputs/overflow-sample.proftext b/llvm/test/tools/llvm-profdata/Inputs/overflow-sample.proftext
new file mode 100644
index 0000000..a5486bb
--- /dev/null
+++ b/llvm/test/tools/llvm-profdata/Inputs/overflow-sample.proftext
@@ -0,0 +1,7 @@
+_Z3bari:18446744073709551615:1000
+ 1: 18446744073709551615
+_Z3fooi:18446744073709551615:1000
+ 1: 18446744073709551615
+main:1000:0
+ 1: 500 _Z3bari:18446744073709551615
+ 2: 500 _Z3fooi:18446744073709551615