COFF: Remove unused field SectionChunk::SectionIndex.
authorPeter Collingbourne <peter@pcc.me.uk>
Wed, 24 Jun 2015 00:12:36 +0000 (00:12 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Wed, 24 Jun 2015 00:12:36 +0000 (00:12 +0000)
llvm-svn: 240512

lld/COFF/Chunks.cpp
lld/COFF/Chunks.h
lld/COFF/InputFiles.cpp

index b931d11b7feb5bc1792febb31541293dd42362c0..10d18c1fb558e86f55f5670ebf991562e6c2b3e9 100644 (file)
@@ -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);
 
index 41cad18f1e87616ebda2f4d4e7a5aadb6554d152..97d6ec130d2b48ce93dc7a95d881948d9361e3b5 100644 (file)
@@ -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;
 
index ec8063ef3c4084f5416a34076e6a904a60fb3ea6..8359495b26fdbe8e21f7bc173b64c3db83c7c2ec 100644 (file)
@@ -136,7 +136,7 @@ std::error_code ObjectFile::initializeChunks() {
       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;
   }