From 9c9891431be73d0476f4d4237853c5908820496b Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Fri, 25 Apr 2014 04:38:40 +0000 Subject: [PATCH] blockfreq: Document assertion git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207194 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/BlockFrequencyInfoImpl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {