[lld] r337276 - [ELF] - Eliminate dead code. NFC.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 17 06:13:08 PDT 2018
Author: grimar
Date: Tue Jul 17 06:13:08 2018
New Revision: 337276
URL: http://llvm.org/viewvc/llvm-project?rev=337276&view=rev
Log:
[ELF] - Eliminate dead code. NFC.
Code was dead because at the moment of BssSection creation
it can never have a parent. Also, code simply does not
make sence as alignment adjastment happens when
BssSection is added to its parent later.
Modified:
lld/trunk/ELF/SyntheticSections.cpp
Modified: lld/trunk/ELF/SyntheticSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SyntheticSections.cpp?rev=337276&r1=337275&r2=337276&view=diff
==============================================================================
--- lld/trunk/ELF/SyntheticSections.cpp (original)
+++ lld/trunk/ELF/SyntheticSections.cpp Tue Jul 17 06:13:08 2018
@@ -328,8 +328,6 @@ void BuildIdSection::computeHash(
BssSection::BssSection(StringRef Name, uint64_t Size, uint32_t Alignment)
: SyntheticSection(SHF_ALLOC | SHF_WRITE, SHT_NOBITS, Alignment, Name) {
this->Bss = true;
- if (OutputSection *Sec = getParent())
- Sec->Alignment = std::max(Sec->Alignment, Alignment);
this->Size = Size;
}
More information about the llvm-commits
mailing list