[lld] r233405 - ELF: Remove blank doPreFlight and finalize member functions.

Rui Ueyama ruiu at google.com
Fri Mar 27 13:15:44 PDT 2015


Author: ruiu
Date: Fri Mar 27 15:15:44 2015
New Revision: 233405

URL: http://llvm.org/viewvc/llvm-project?rev=233405&view=rev
Log:
ELF: Remove blank doPreFlight and finalize member functions.

Make these functions non-pure and define the default implementations.

Modified:
    lld/trunk/lib/ReaderWriter/ELF/Chunk.h
    lld/trunk/lib/ReaderWriter/ELF/HeaderChunks.h
    lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h
    lld/trunk/lib/ReaderWriter/ELF/SegmentChunks.h

Modified: lld/trunk/lib/ReaderWriter/ELF/Chunk.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Chunk.h?rev=233405&r1=233404&r2=233405&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Chunk.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Chunk.h Fri Mar 27 15:15:44 2015
@@ -88,10 +88,10 @@ public:
                      llvm::FileOutputBuffer &buffer) = 0;
 
   // Finalize the chunk before assigning offsets/virtual addresses
-  virtual void doPreFlight() = 0;
+  virtual void doPreFlight() {}
 
   // Finalize the chunk before writing
-  virtual void finalize() = 0;
+  virtual void finalize() {}
 
 protected:
   StringRef _name;

Modified: lld/trunk/lib/ReaderWriter/ELF/HeaderChunks.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/HeaderChunks.h?rev=233405&r1=233404&r2=233405&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/HeaderChunks.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/HeaderChunks.h Fri Mar 27 15:15:44 2015
@@ -54,7 +54,6 @@ public:
   void write(ELFWriter *writer, TargetLayout<ELFT> &layout,
              llvm::FileOutputBuffer &buffer);
 
-  virtual void doPreFlight() {}
 
   void finalize() {
     _eh.e_ident[llvm::ELF::EI_CLASS] =
@@ -162,9 +161,7 @@ public:
 
   ReversePhIterT rend() { return _ph.rend(); }
 
-  virtual void doPreFlight() {}
 
-  void finalize() {}
 
   int64_t entsize() { return sizeof(Elf_Phdr); }
 
@@ -281,9 +278,7 @@ public:
   void write(ELFWriter *writer, TargetLayout<ELFT> &layout,
              llvm::FileOutputBuffer &buffer);
 
-  virtual void doPreFlight() {}
 
-  void finalize() {}
 
   uint64_t fileSize() const { return sizeof(Elf_Shdr) * _sectionInfo.size(); }
 

Modified: lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h?rev=233405&r1=233404&r2=233405&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h Fri Mar 27 15:15:44 2015
@@ -49,10 +49,8 @@ public:
 
   /// \brief Modify the section contents before assigning virtual addresses
   //  or assigning file offsets
-  void doPreFlight() override {}
 
   /// \brief Finalize the section contents before writing
-  void finalize() override {}
 
   /// \brief Does this section have an output segment.
   virtual bool hasOutputSegment() {

Modified: lld/trunk/lib/ReaderWriter/ELF/SegmentChunks.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/SegmentChunks.h?rev=233405&r1=233404&r2=233405&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/SegmentChunks.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/SegmentChunks.h Fri Mar 27 15:15:44 2015
@@ -154,7 +154,6 @@ public:
   }
 
   /// Finalize the segment before assigning File Offsets / Virtual addresses
-  void doPreFlight() {}
 
   /// Finalize the segment, before we want to write the segment header
   /// information
@@ -288,8 +287,6 @@ public:
   }
   void write(ELFWriter *, TargetLayout<ELFT> &,
              llvm::FileOutputBuffer &) override {}
-  void doPreFlight() override {}
-  void finalize() override {}
 
   std::error_code evalExpr(uint64_t &curPos) {
     return _linkerScriptSema.evalExpr(_expr, curPos);





More information about the llvm-commits mailing list