projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b8de0c4
)
Add const to sort() comparator function. Caught by gcc but not clang
author
Nick Kledzik
<kledzik@apple.com>
Fri, 27 Jun 2014 01:04:01 +0000
(
01:04
+0000)
committer
Nick Kledzik
<kledzik@apple.com>
Fri, 27 Jun 2014 01:04:01 +0000
(
01:04
+0000)
llvm-svn: 211833
lld/include/lld/Core/Simple.h
patch
|
blob
|
history
diff --git
a/lld/include/lld/Core/Simple.h
b/lld/include/lld/Core/Simple.h
index
ad041b6
..
307f454
100644
(file)
--- 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)