[lld] r259843 - Merge conditions of two nested `if`s.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 4 15:18:22 PST 2016
Author: ruiu
Date: Thu Feb 4 17:18:22 2016
New Revision: 259843
URL: http://llvm.org/viewvc/llvm-project?rev=259843&view=rev
Log:
Merge conditions of two nested `if`s.
Modified:
lld/trunk/ELF/Writer.cpp
Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=259843&r1=259842&r2=259843&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Thu Feb 4 17:18:22 2016
@@ -292,12 +292,11 @@ void Writer<ELFT>::scanRelocs(
Body, getAddend<ELFT>(RI)});
// MIPS has a special rule to create GOTs for local symbols.
- if (Config->EMachine == EM_MIPS && !canBePreempted(Body, true)) {
- if (Type == R_MIPS_GOT16 || Type == R_MIPS_CALL16) {
- // FIXME (simon): Do not add so many redundant entries.
- Out<ELFT>::Got->addMipsLocalEntry();
- continue;
- }
+ if (Config->EMachine == EM_MIPS && !canBePreempted(Body, true) &&
+ (Type == R_MIPS_GOT16 || Type == R_MIPS_CALL16)) {
+ // FIXME (simon): Do not add so many redundant entries.
+ Out<ELFT>::Got->addMipsLocalEntry();
+ continue;
}
// If a symbol in a DSO is referenced directly instead of through GOT,
More information about the llvm-commits
mailing list