From: Duncan P. N. Exon Smith Date: Fri, 25 Apr 2014 04:38:40 +0000 (+0000) Subject: blockfreq: Document assertion X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=9c9891431be73d0476f4d4237853c5908820496b;ds=sidebyside blockfreq: Document assertion git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207194 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/BlockFrequencyInfoImpl.cpp b/lib/Analysis/BlockFrequencyInfoImpl.cpp index a41ec4527e8..cb92e5bbb11 100644 --- a/lib/Analysis/BlockFrequencyInfoImpl.cpp +++ b/lib/Analysis/BlockFrequencyInfoImpl.cpp @@ -485,7 +485,7 @@ static void combineWeight(Weight &W, const Weight &OtherW) { } 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) {