From 1e8dbd360da8c0a114f575ebb287f239b7a298c2 Mon Sep 17 00:00:00 2001 From: Nick Kledzik Date: Fri, 27 Jun 2014 01:04:01 +0000 Subject: [PATCH] Add const to sort() comparator function. Caught by gcc but not clang llvm-svn: 211833 --- lld/include/lld/Core/Simple.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.7.4