diff options
| author | George Rimar <grimar@accesssoftek.com> | 2017-09-01 12:04:52 +0000 |
|---|---|---|
| committer | George Rimar <grimar@accesssoftek.com> | 2017-09-01 12:04:52 +0000 |
| commit | e89c5bfbc20e69333d8aebdc5c8669a078391d99 (patch) | |
| tree | 6d4de514f630bcb92db4f8cf2a1ba4c2f14f330e | |
| parent | bc0c4459c9d34067adc45d31320e0d51e347b39f (diff) | |
| download | bcm5719-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.cpp | 1 | ||||
| -rw-r--r-- | lld/ELF/SyntheticSections.cpp | 1 |
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; } |

