blockfreq: Document assertion
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 25 Apr 2014 04:38:40 +0000 (04:38 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 25 Apr 2014 04:38:40 +0000 (04:38 +0000)
<rdar://problem/14292693>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207194 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/BlockFrequencyInfoImpl.cpp

index a41ec4527e8b2d7f8dc091ee9d53b8991b652e15..cb92e5bbb11c24ee96e226e67d4b80deb69e32cd 100644 (file)
@@ -485,7 +485,7 @@ static void combineWeight(Weight &W, const Weight &OtherW) {
   }
   assert(W.Type == OtherW.Type);
   assert(W.TargetNode == OtherW.TargetNode);
   }
   assert(W.Type == OtherW.Type);
   assert(W.TargetNode == OtherW.TargetNode);
-  assert(W.Amount < W.Amount + OtherW.Amount);
+  assert(W.Amount < W.Amount + OtherW.Amount && "Unexpected overflow");
   W.Amount += OtherW.Amount;
 }
 static void combineWeightsBySorting(WeightList &Weights) {
   W.Amount += OtherW.Amount;
 }
 static void combineWeightsBySorting(WeightList &Weights) {