From: Nick Kledzik Date: Fri, 27 Jun 2014 01:04:01 +0000 (+0000) Subject: Add const to sort() comparator function. Caught by gcc but not clang X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1e8dbd360da8c0a114f575ebb287f239b7a298c2;p=platform%2Fupstream%2Fllvm.git Add const to sort() comparator function. Caught by gcc but not clang llvm-svn: 211833 --- diff --git a/lld/include/lld/Core/Simple.h b/lld/include/lld/Core/Simple.h index ad041b6..307f454 100644 --- a/lld/include/lld/Core/Simple.h +++ b/lld/include/lld/Core/Simple.h @@ -174,7 +174,7 @@ public: /// Sort references in a canonical order (by offset, then by kind). void sortReferences() const { std::sort(_references.begin(), _references.end(), - [] (SimpleReference &lhs, SimpleReference &rhs) -> bool { + [] (const SimpleReference &lhs, const SimpleReference &rhs) -> bool { uint64_t lhsOffset = lhs.offsetInAtom(); uint64_t rhsOffset = rhs.offsetInAtom(); if (rhsOffset != lhsOffset)