[lld] r336356 - [ELF] - Eliminate dead "if". NFC.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 5 07:27:36 PDT 2018
Author: grimar
Date: Thu Jul 5 07:27:36 2018
New Revision: 336356
URL: http://llvm.org/viewvc/llvm-project?rev=336356&view=rev
Log:
[ELF] - Eliminate dead "if". NFC.
We call switchTo() from assignAddresses() for switching to Aether,
and from assignOffsets().
First calls assignOffsets() one by one for each output section.
(https://github.com/llvm-mirror/lld/blob/master/ELF/LinkerScript.cpp#L1045)
That I believe means the condition removed in this patch is dead.
Modified:
lld/trunk/ELF/LinkerScript.cpp
Modified: lld/trunk/ELF/LinkerScript.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.cpp?rev=336356&r1=336355&r2=336356&view=diff
==============================================================================
--- lld/trunk/ELF/LinkerScript.cpp (original)
+++ lld/trunk/ELF/LinkerScript.cpp Thu Jul 5 07:27:36 2018
@@ -710,8 +710,6 @@ void LinkerScript::output(InputSection *
}
void LinkerScript::switchTo(OutputSection *Sec) {
- if (Ctx->OutSec == Sec)
- return;
Ctx->OutSec = Sec;
uint64_t Before = advance(0, 1);
More information about the llvm-commits
mailing list