svn commit: r326879 - head/contrib/llvm/tools/lld/ELF
Ed Maste
emaste at FreeBSD.org
Fri Dec 15 18:56:14 UTC 2017
Author: emaste
Date: Fri Dec 15 18:56:12 2017
New Revision: 326879
URL: https://svnweb.freebsd.org/changeset/base/326879
Log:
lld: Simplify a boolean expression by De Morgan's laws.
Cherry-pick lld r315653 by Rui Ueyama:
I don't really understand what exactly this expression means,
but at least I can mechanically transform it.
Obtained from: LLVM r315653
MFC after: 1 week
Modified:
head/contrib/llvm/tools/lld/ELF/Relocations.cpp
Modified: head/contrib/llvm/tools/lld/ELF/Relocations.cpp
==============================================================================
--- head/contrib/llvm/tools/lld/ELF/Relocations.cpp Fri Dec 15 18:09:23 2017 (r326878)
+++ head/contrib/llvm/tools/lld/ELF/Relocations.cpp Fri Dec 15 18:56:12 2017 (r326879)
@@ -790,7 +790,7 @@ static void addGotEntry(SymbolBody &Sym, bool Preempti
DynType = Target->GotRel;
}
- bool Constant = !Preemptible && !(Config->Pic && !isAbsolute(Sym));
+ bool Constant = !Preemptible && (!Config->Pic || isAbsolute(Sym));
if (!Constant)
In<ELFT>::RelaDyn->addReloc(
{DynType, InX::Got, Off, !Preemptible, &Sym, 0});
More information about the svn-src-all
mailing list