[llvm] r270155 - Add const qualifiers to appease bots; NFC
Sanjoy Das via llvm-commits
llvm-commits at lists.llvm.org
Thu May 19 16:16:00 PDT 2016
Author: sanjoy
Date: Thu May 19 18:15:59 2016
New Revision: 270155
URL: http://llvm.org/viewvc/llvm-project?rev=270155&view=rev
Log:
Add const qualifiers to appease bots; NFC
Modified:
llvm/trunk/lib/Transforms/Scalar/GuardWidening.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/GuardWidening.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GuardWidening.cpp?rev=270155&r1=270154&r2=270155&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/GuardWidening.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/GuardWidening.cpp Thu May 19 18:15:59 2016
@@ -571,8 +571,8 @@ bool GuardWideningImpl::combineRangeChec
// 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::combineRangeChec
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);
};
More information about the llvm-commits
mailing list