projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
40b3496
)
Swap operands instead of using !.
author
Rafael Espindola
<rafael.espindola@gmail.com>
Mon, 6 Jul 2015 19:24:40 +0000
(19:24 +0000)
committer
Rafael Espindola
<rafael.espindola@gmail.com>
Mon, 6 Jul 2015 19:24:40 +0000
(19:24 +0000)
This avoids returning true for A == B.
Thanks to Benjamin Kramer for noticing it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241490
91177308
-0d34-0410-b5e6-
96231b3b80d8
tools/llvm-nm/llvm-nm.cpp
patch
|
blob
|
history
diff --git
a/tools/llvm-nm/llvm-nm.cpp
b/tools/llvm-nm/llvm-nm.cpp
index c30d628d9a59dee16d1853e7e65572738133c2f9..b750b5f755a81f50fdf761aa5b598fb46febfa85 100644
(file)
--- a/
tools/llvm-nm/llvm-nm.cpp
+++ b/
tools/llvm-nm/llvm-nm.cpp
@@
-510,7
+510,7
@@
static void sortAndPrintSymbolList(SymbolicFile &Obj, bool printName,
Cmp = compareSymbolName;
if (ReverseSort)
- Cmp = [=](const NMSymbol &A, const NMSymbol &B) { return
!Cmp(A, B
); };
+ Cmp = [=](const NMSymbol &A, const NMSymbol &B) { return
Cmp(B, A
); };
std::sort(SymbolList.begin(), SymbolList.end(), Cmp);
}