[lld] r263999 - [ELF] Simplify code a bit. No functional change.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 21 15:44:24 PDT 2016
Author: davide
Date: Mon Mar 21 17:44:24 2016
New Revision: 263999
URL: http://llvm.org/viewvc/llvm-project?rev=263999&view=rev
Log:
[ELF] Simplify code a bit. No functional change.
Modified:
lld/trunk/ELF/Symbols.cpp
Modified: lld/trunk/ELF/Symbols.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.cpp?rev=263999&r1=263998&r2=263999&view=diff
==============================================================================
--- lld/trunk/ELF/Symbols.cpp (original)
+++ lld/trunk/ELF/Symbols.cpp Mon Mar 21 17:44:24 2016
@@ -157,9 +157,7 @@ static int compareCommons(DefinedCommon
if (Config->WarnCommon)
warning("multiple common of " + A->getName());
A->Alignment = B->Alignment = std::max(A->Alignment, B->Alignment);
- if (A->Size < B->Size)
- return -1;
- return 1;
+ return A->Size < B->Size ? -1 : 1;
}
// Returns 1, 0 or -1 if this symbol should take precedence
More information about the llvm-commits
mailing list