[lld] r244696 - Delete dead code.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 11 16:19:06 PDT 2015


Author: rafael
Date: Tue Aug 11 18:19:06 2015
New Revision: 244696

URL: http://llvm.org/viewvc/llvm-project?rev=244696&view=rev
Log:
Delete dead code.

Modified:
    lld/trunk/ELF/Chunks.h
    lld/trunk/ELF/Writer.cpp

Modified: lld/trunk/ELF/Chunks.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Chunks.h?rev=244696&r1=244695&r2=244696&view=diff
==============================================================================
--- lld/trunk/ELF/Chunks.h (original)
+++ lld/trunk/ELF/Chunks.h Tue Aug 11 18:19:06 2015
@@ -48,11 +48,6 @@ public:
   // It is illegal to call this function on non-section chunks.
   virtual StringRef getSectionName() const = 0;
 
-  // An output section has pointers to chunks in the section, and each
-  // chunk has a back pointer to an output section.
-  void setOutputSection(OutputSection *O) { Out = O; }
-  OutputSection *getOutputSection() { return Out; }
-
 protected:
   // The VA of this chunk in the output. The writer sets a value.
   uint64_t VA = 0;
@@ -60,9 +55,6 @@ protected:
   // The offset from beginning of the output file. The writer sets a value.
   uint64_t FileOff = 0;
 
-  // The output section for this chunk.
-  OutputSection *Out = nullptr;
-
   // The alignment of this chunk. The writer uses the value.
   uint32_t Align = 1;
 };

Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=244696&r1=244695&r2=244696&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Tue Aug 11 18:19:06 2015
@@ -119,7 +119,6 @@ void OutputSection::addSectionChunk(Sect
   typedef typename llvm::object::ELFFile<ELFT>::uintX_t uintX_t;
 
   Chunks.push_back(C);
-  C->setOutputSection(this);
   uintX_t Off = Header.sh_size;
   Off = RoundUpToAlignment(Off, C->getAlign());
   C->setVA(Off);




More information about the llvm-commits mailing list