forked from OSchip/llvm-project
COFF: Remove unused field SectionChunk::SectionIndex.
llvm-svn: 240512
This commit is contained in:
parent
2ed4c8f55d
commit
bd3a29d063
|
@ -26,8 +26,8 @@ using namespace llvm::COFF;
|
||||||
namespace lld {
|
namespace lld {
|
||||||
namespace coff {
|
namespace coff {
|
||||||
|
|
||||||
SectionChunk::SectionChunk(ObjectFile *F, const coff_section *H, uint32_t SI)
|
SectionChunk::SectionChunk(ObjectFile *F, const coff_section *H)
|
||||||
: File(F), Header(H), SectionIndex(SI) {
|
: File(F), Header(H) {
|
||||||
// Initialize SectionName.
|
// Initialize SectionName.
|
||||||
File->getCOFFObj()->getSectionName(Header, SectionName);
|
File->getCOFFObj()->getSectionName(Header, SectionName);
|
||||||
|
|
||||||
|
|
|
@ -123,8 +123,7 @@ protected:
|
||||||
// A chunk corresponding a section of an input file.
|
// A chunk corresponding a section of an input file.
|
||||||
class SectionChunk : public Chunk {
|
class SectionChunk : public Chunk {
|
||||||
public:
|
public:
|
||||||
SectionChunk(ObjectFile *File, const coff_section *Header,
|
SectionChunk(ObjectFile *File, const coff_section *Header);
|
||||||
uint32_t SectionIndex);
|
|
||||||
size_t getSize() const override { return Header->SizeOfRawData; }
|
size_t getSize() const override { return Header->SizeOfRawData; }
|
||||||
void writeTo(uint8_t *Buf) override;
|
void writeTo(uint8_t *Buf) override;
|
||||||
bool hasData() const override;
|
bool hasData() const override;
|
||||||
|
@ -150,7 +149,6 @@ private:
|
||||||
ObjectFile *File;
|
ObjectFile *File;
|
||||||
|
|
||||||
const coff_section *Header;
|
const coff_section *Header;
|
||||||
uint32_t SectionIndex;
|
|
||||||
StringRef SectionName;
|
StringRef SectionName;
|
||||||
std::vector<Chunk *> AssocChildren;
|
std::vector<Chunk *> AssocChildren;
|
||||||
|
|
||||||
|
|
|
@ -136,7 +136,7 @@ std::error_code ObjectFile::initializeChunks() {
|
||||||
continue;
|
continue;
|
||||||
if (Sec->Characteristics & llvm::COFF::IMAGE_SCN_LNK_REMOVE)
|
if (Sec->Characteristics & llvm::COFF::IMAGE_SCN_LNK_REMOVE)
|
||||||
continue;
|
continue;
|
||||||
auto *C = new (Alloc) SectionChunk(this, Sec, I);
|
auto *C = new (Alloc) SectionChunk(this, Sec);
|
||||||
Chunks.push_back(C);
|
Chunks.push_back(C);
|
||||||
SparseChunks[I] = C;
|
SparseChunks[I] = C;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue