summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2017-09-01 12:04:52 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2017-09-01 12:04:52 +0000
commite89c5bfbc20e69333d8aebdc5c8669a078391d99 (patch)
tree6d4de514f630bcb92db4f8cf2a1ba4c2f14f330e
parentbc0c4459c9d34067adc45d31320e0d51e347b39f (diff)
downloadbcm5719-llvm-e89c5bfbc20e69333d8aebdc5c8669a078391d99.tar.gz
bcm5719-llvm-e89c5bfbc20e69333d8aebdc5c8669a078391d99.zip
[ELF] - Never call splitIntoPieces() twice. NFC.
Previously it was called twice for .comment synthetic section. That created 2 pieces of data, which was deduplicated anyways, but was not clean. llvm-svn: 312327
-rw-r--r--lld/ELF/InputSection.cpp1
-rw-r--r--lld/ELF/SyntheticSections.cpp1
2 files changed, 1 insertions, 1 deletions
diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp
index ef941bc40d4..addfe8f3fc4 100644
--- a/lld/ELF/InputSection.cpp
+++ b/lld/ELF/InputSection.cpp
@@ -923,6 +923,7 @@ MergeInputSection::MergeInputSection(ObjFile<ELFT> *F,
// Note that this function is called from parallelForEach. This must be
// thread-safe (i.e. no memory allocation from the pools).
void MergeInputSection::splitIntoPieces() {
+ assert(Pieces.empty());
ArrayRef<uint8_t> Data = this->Data;
uint64_t EntSize = this->Entsize;
if (this->Flags & SHF_STRINGS)
diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp
index ebd77c83be1..c4e1e1140c2 100644
--- a/lld/ELF/SyntheticSections.cpp
+++ b/lld/ELF/SyntheticSections.cpp
@@ -112,7 +112,6 @@ template <class ELFT> MergeInputSection *elf::createCommentSection() {
auto *Ret =
make<MergeInputSection>((ObjFile<ELFT> *)nullptr, &Hdr, ".comment");
Ret->Data = getVersion();
- Ret->splitIntoPieces();
return Ret;
}
OpenPOWER on IntegriCloud