From 25f51850a4f2f29c16e78e5a889527f4ae486d61 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Thu, 13 Aug 2015 14:48:49 +0000 Subject: [PATCH] Delete dead code. llvm-svn: 244896 --- lld/ELF/Chunks.h | 5 ----- lld/ELF/Writer.cpp | 3 --- 2 files changed, 8 deletions(-) diff --git a/lld/ELF/Chunks.h b/lld/ELF/Chunks.h index 286fa20b3316..1462724dafbc 100644 --- a/lld/ELF/Chunks.h +++ b/lld/ELF/Chunks.h @@ -37,10 +37,8 @@ public: virtual void writeTo(uint8_t *Buf) = 0; // The writer sets and uses the addresses. - uint64_t getVA() { return VA; } uint64_t getFileOff() { return FileOff; } uint32_t getAlign() { return Align; } - void setVA(uint64_t V) { VA = V; } void setFileOff(uint64_t V) { FileOff = V; } // Returns the section name if this is a section chunk. @@ -48,9 +46,6 @@ public: virtual StringRef getSectionName() const = 0; protected: - // The VA of this chunk in the output. The writer sets a value. - uint64_t VA = 0; - // The offset from beginning of the output file. The writer sets a value. uint64_t FileOff = 0; diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 2f435101b3ba..0b6ffdbab13a 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -114,8 +114,6 @@ template void Writer::run() { template void OutputSection::setVA(uintX_t VA) { Header.sh_addr = VA; - for (Chunk *C : Chunks) - C->setVA(C->getVA() + VA); } template void OutputSection::setFileOffset(uintX_t Off) { @@ -131,7 +129,6 @@ void OutputSection::addSectionChunk(SectionChunk *C) { Chunks.push_back(C); uintX_t Off = Header.sh_size; Off = RoundUpToAlignment(Off, C->getAlign()); - C->setVA(Off); C->setFileOff(Off); Off += C->getSize(); Header.sh_size = Off;