[Support] Change SaturatingAdd()/SaturatingMultiply() to use pointer for returning...
[oota-llvm.git] / include / llvm / ProfileData / InstrProf.h
index 3e711bb60cf04ef80dd839fdfb15171740158bfc..2730cc167f7dfa248dd077d2a3251d2e6a3e8d8a 100644 (file)
@@ -435,7 +435,7 @@ instrprof_error InstrProfRecord::merge(InstrProfRecord &Other) {
 
   for (size_t I = 0, E = Other.Counts.size(); I < E; ++I) {
     bool ResultOverflowed;
-    Counts[I] = SaturatingAdd(Counts[I], Other.Counts[I], ResultOverflowed);
+    Counts[I] = SaturatingAdd(Counts[I], Other.Counts[I], &ResultOverflowed);
     if (ResultOverflowed)
       Result = instrprof_error::counter_overflow;
   }