From 8cb02d7aab7d487a0fb1875cf3bf92e05204dfb8 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Wed, 4 Dec 2013 08:38:38 +0000 Subject: [PATCH] Delete dead code. llvm-svn: 196366 --- lld/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/lld/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp b/lld/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp index f5ce45272f2c..bef4bc6d384e 100644 --- a/lld/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp +++ b/lld/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp @@ -302,10 +302,7 @@ public: protected: SectionChunk(StringRef sectionName, uint32_t characteristics); - void buildContents(const File &linkedFile, - bool (*isEligible)(const DefinedAtom *)); const uint32_t _characteristics; - llvm::object::coff_section _sectionHeader; private: @@ -655,22 +652,6 @@ SectionChunk::SectionChunk(StringRef sectionName, uint32_t characteristics) _align = SECTOR_SIZE; } -void SectionChunk::buildContents(const File &linkedFile, - bool (*isEligible)(const DefinedAtom *)) { - // Extract atoms from the linked file and append them to this section. - for (const DefinedAtom *atom : linkedFile.defined()) { - if (isEligible(atom)) - appendAtom(atom); - } - - // Now that we have a list of atoms that to be written in this section, - // and we know the size of the section. Let's write them to the section - // header. VirtualSize should be the size of the actual content, and - // SizeOfRawData should be aligned to the section alignment. - _sectionHeader.VirtualSize = _size; - _sectionHeader.SizeOfRawData = size(); -} - llvm::object::coff_section SectionChunk::createSectionHeader(StringRef sectionName, uint32_t characteristics) const {