[lld] r259472 - Do not use "No" prefix for boolean variables to make it simpler. NFC.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 1 23:18:15 PST 2016


Author: ruiu
Date: Tue Feb  2 01:18:15 2016
New Revision: 259472

URL: http://llvm.org/viewvc/llvm-project?rev=259472&view=rev
Log:
Do not use "No" prefix for boolean variables to make it simpler. NFC.

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=259472&r1=259471&r2=259472&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Tue Feb  2 01:18:15 2016
@@ -391,14 +391,12 @@ void Writer<ELFT>::scanRelocs(
     // a relocation from an object file, but some relocations need no
     // load-time fixup when the final target is known. Skip such relocation.
     bool CBP = canBePreempted(Body, /*NeedsGot=*/false);
-    bool NoDynrel = Target->isRelRelative(Type) || Target->isSizeRel(Type) ||
-                    !Config->Shared;
-    if (!CBP && NoDynrel)
-      continue;
-
+    bool Dynrel = Config->Shared && !Target->isRelRelative(Type) &&
+                  !Target->isSizeRel(Type);
     if (CBP)
       Body->setUsedInDynamicReloc();
-    Out<ELFT>::RelaDyn->addReloc({&C, &RI});
+    if (CBP || Dynrel)
+      Out<ELFT>::RelaDyn->addReloc({&C, &RI});
   }
 }
 




More information about the llvm-commits mailing list