summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2016-02-02 07:18:15 +0000
committerRui Ueyama <ruiu@google.com>2016-02-02 07:18:15 +0000
commit05aecba11810a44e0f8d8a700bf0523db7ec22ff (patch)
tree6ca126956d223eb22dbd82241ebe7fd1052c545a
parentf263c4b0f1b4c798c5fbfae0cb13d661f3a97372 (diff)
downloadbcm5719-llvm-05aecba11810a44e0f8d8a700bf0523db7ec22ff.tar.gz
bcm5719-llvm-05aecba11810a44e0f8d8a700bf0523db7ec22ff.zip
Do not use "No" prefix for boolean variables to make it simpler. NFC.
llvm-svn: 259472
-rw-r--r--lld/ELF/Writer.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index 3d7c748b0c5..d7c82db2c82 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -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});
}
}
OpenPOWER on IntegriCloud