summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2015-06-24 00:12:36 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2015-06-24 00:12:36 +0000
commitbd3a29d0638eef55f0855280c53e4badee35b130 (patch)
tree2eb0855f6cbd7270cd81978594ae23fd55067176
parent2ed4c8f55d94d8b358a7d9945e7b49d68888cc1f (diff)
downloadbcm5719-llvm-bd3a29d0638eef55f0855280c53e4badee35b130.tar.gz
bcm5719-llvm-bd3a29d0638eef55f0855280c53e4badee35b130.zip
COFF: Remove unused field SectionChunk::SectionIndex.
llvm-svn: 240512
-rw-r--r--lld/COFF/Chunks.cpp4
-rw-r--r--lld/COFF/Chunks.h4
-rw-r--r--lld/COFF/InputFiles.cpp2
3 files changed, 4 insertions, 6 deletions
diff --git a/lld/COFF/Chunks.cpp b/lld/COFF/Chunks.cpp
index b931d11b7fe..10d18c1fb55 100644
--- a/lld/COFF/Chunks.cpp
+++ b/lld/COFF/Chunks.cpp
@@ -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);
diff --git a/lld/COFF/Chunks.h b/lld/COFF/Chunks.h
index 41cad18f1e8..97d6ec130d2 100644
--- a/lld/COFF/Chunks.h
+++ b/lld/COFF/Chunks.h
@@ -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;
diff --git a/lld/COFF/InputFiles.cpp b/lld/COFF/InputFiles.cpp
index ec8063ef3c4..8359495b26f 100644
--- a/lld/COFF/InputFiles.cpp
+++ b/lld/COFF/InputFiles.cpp
@@ -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;
}
OpenPOWER on IntegriCloud