[lld] r196366 - Delete dead code.

Rui Ueyama ruiu at google.com
Wed Dec 4 00:38:38 PST 2013


Author: ruiu
Date: Wed Dec  4 02:38:38 2013
New Revision: 196366

URL: http://llvm.org/viewvc/llvm-project?rev=196366&view=rev
Log:
Delete dead code.

Modified:
    lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp

Modified: lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp?rev=196366&r1=196365&r2=196366&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp (original)
+++ lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp Wed Dec  4 02:38:38 2013
@@ -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 sec
   _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 {





More information about the llvm-commits mailing list