From d3cb25f5e5b940fb66eace939ab01ca3b6d57c37 Mon Sep 17 00:00:00 2001 From: Sanjoy Das Date: Thu, 19 May 2016 23:15:59 +0000 Subject: [PATCH] Add const qualifiers to appease bots; NFC llvm-svn: 270155 --- lib/Transforms/Scalar/GuardWidening.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Transforms/Scalar/GuardWidening.cpp b/lib/Transforms/Scalar/GuardWidening.cpp index 24be4f508cc..f407a32bf05 100644 --- a/lib/Transforms/Scalar/GuardWidening.cpp +++ b/lib/Transforms/Scalar/GuardWidening.cpp @@ -571,8 +571,8 @@ bool GuardWideningImpl::combineRangeChecks( // hard-code that fact. std::sort(ChecksStart, Checks.end(), - [&](GuardWideningImpl::RangeCheck &LHS, - GuardWideningImpl::RangeCheck &RHS) { + [&](const GuardWideningImpl::RangeCheck &LHS, + const GuardWideningImpl::RangeCheck &RHS) { return LHS.Offset->getValue().slt(RHS.Offset->getValue()); }); @@ -588,7 +588,7 @@ bool GuardWideningImpl::combineRangeChecks( APInt MaxDiff = MaxOffset->getValue() - MinOffset->getValue(); APInt HighOffset = MaxOffset->getValue(); - auto OffsetOK = [&](GuardWideningImpl::RangeCheck &RC) { + auto OffsetOK = [&](const GuardWideningImpl::RangeCheck &RC) { return (HighOffset - RC.Offset->getValue()).ult(MaxDiff); };