[lld] r240512 - COFF: Remove unused field SectionChunk::SectionIndex.

Peter Collingbourne peter at pcc.me.uk
Tue Jun 23 17:12:36 PDT 2015


Author: pcc
Date: Tue Jun 23 19:12:36 2015
New Revision: 240512

URL: http://llvm.org/viewvc/llvm-project?rev=240512&view=rev
Log:
COFF: Remove unused field SectionChunk::SectionIndex.

Modified:
    lld/trunk/COFF/Chunks.cpp
    lld/trunk/COFF/Chunks.h
    lld/trunk/COFF/InputFiles.cpp

Modified: lld/trunk/COFF/Chunks.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Chunks.cpp?rev=240512&r1=240511&r2=240512&view=diff
==============================================================================
--- lld/trunk/COFF/Chunks.cpp (original)
+++ lld/trunk/COFF/Chunks.cpp Tue Jun 23 19:12:36 2015
@@ -26,8 +26,8 @@ using namespace llvm::COFF;
 namespace lld {
 namespace coff {
 
-SectionChunk::SectionChunk(ObjectFile *F, const coff_section *H, uint32_t SI)
-    : File(F), Header(H), SectionIndex(SI) {
+SectionChunk::SectionChunk(ObjectFile *F, const coff_section *H)
+    : File(F), Header(H) {
   // Initialize SectionName.
   File->getCOFFObj()->getSectionName(Header, SectionName);
 

Modified: lld/trunk/COFF/Chunks.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Chunks.h?rev=240512&r1=240511&r2=240512&view=diff
==============================================================================
--- lld/trunk/COFF/Chunks.h (original)
+++ lld/trunk/COFF/Chunks.h Tue Jun 23 19:12:36 2015
@@ -123,8 +123,7 @@ protected:
 // A chunk corresponding a section of an input file.
 class SectionChunk : public Chunk {
 public:
-  SectionChunk(ObjectFile *File, const coff_section *Header,
-               uint32_t SectionIndex);
+  SectionChunk(ObjectFile *File, const coff_section *Header);
   size_t getSize() const override { return Header->SizeOfRawData; }
   void writeTo(uint8_t *Buf) override;
   bool hasData() const override;
@@ -150,7 +149,6 @@ private:
   ObjectFile *File;
 
   const coff_section *Header;
-  uint32_t SectionIndex;
   StringRef SectionName;
   std::vector<Chunk *> AssocChildren;
 

Modified: lld/trunk/COFF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/InputFiles.cpp?rev=240512&r1=240511&r2=240512&view=diff
==============================================================================
--- lld/trunk/COFF/InputFiles.cpp (original)
+++ lld/trunk/COFF/InputFiles.cpp Tue Jun 23 19:12:36 2015
@@ -136,7 +136,7 @@ std::error_code ObjectFile::initializeCh
       continue;
     if (Sec->Characteristics & llvm::COFF::IMAGE_SCN_LNK_REMOVE)
       continue;
-    auto *C = new (Alloc) SectionChunk(this, Sec, I);
+    auto *C = new (Alloc) SectionChunk(this, Sec);
     Chunks.push_back(C);
     SparseChunks[I] = C;
   }





More information about the llvm-commits mailing list