[lld] r233423 - Remove empty constructors.

Rui Ueyama ruiu at google.com
Fri Mar 27 14:39:13 PDT 2015


Author: ruiu
Date: Fri Mar 27 16:39:13 2015
New Revision: 233423

URL: http://llvm.org/viewvc/llvm-project?rev=233423&view=rev
Log:
Remove empty constructors.

Modified:
    lld/trunk/lib/ReaderWriter/ELF/Layout.h
    lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h
    lld/trunk/lib/ReaderWriter/ELF/SegmentChunks.h
    lld/trunk/lib/ReaderWriter/ELF/TargetHandler.h
    lld/trunk/lib/ReaderWriter/ELF/Writer.h

Modified: lld/trunk/lib/ReaderWriter/ELF/Layout.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Layout.h?rev=233423&r1=233422&r2=233423&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Layout.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Layout.h Fri Mar 27 16:39:13 2015
@@ -33,26 +33,27 @@ public:
   typedef uint32_t SegmentType;
   typedef uint32_t Flags;
 
-public:
+  virtual ~Layout() {}
+
   /// Return the order the section would appear in the output file
   virtual SectionOrder getSectionOrder(StringRef name, int32_t contentType,
                                        int32_t contentPerm) = 0;
+
   /// \brief Append the Atom to the layout and create appropriate sections.
   /// \returns A reference to the atom layout or an error. The atom layout will
   /// be updated as linking progresses.
   virtual ErrorOr<const lld::AtomLayout *> addAtom(const Atom *atom) = 0;
+
   /// find the Atom in the current layout
   virtual const AtomLayout *findAtomLayoutByName(StringRef name) const = 0;
+
   /// associates a section to a segment
   virtual void assignSectionsToSegments() = 0;
+
   /// associates a virtual address to the segment, section, and the atom
   virtual void assignVirtualAddress() = 0;
-
-public:
-  Layout() {}
-
-  virtual ~Layout() { }
 };
+
 } // end namespace elf
 } // end namespace lld
 

Modified: lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h?rev=233423&r1=233422&r2=233423&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h Fri Mar 27 16:39:13 2015
@@ -53,9 +53,7 @@ public:
   /// \brief Finalize the section contents before writing
 
   /// \brief Does this section have an output segment.
-  virtual bool hasOutputSegment() {
-    return false;
-  }
+  virtual bool hasOutputSegment() { return false; }
 
   /// Return if the section is a loadable section that occupies memory
   virtual bool isLoadableSection() const { return false; }

Modified: lld/trunk/lib/ReaderWriter/ELF/SegmentChunks.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/SegmentChunks.h?rev=233423&r1=233422&r2=233423&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/SegmentChunks.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/SegmentChunks.h Fri Mar 27 16:39:13 2015
@@ -38,8 +38,6 @@ class SegmentSlice {
 public:
   typedef typename std::vector<Chunk<ELFT> *>::iterator SectionIter;
 
-  SegmentSlice() { }
-
   /// Set the start of the slice.
   void setStart(int32_t s) { _startSection = s; }
 
@@ -49,12 +47,10 @@ public:
 
   // Return the fileOffset of the slice
   uint64_t fileOffset() const { return _offset; }
-
   void setFileOffset(uint64_t offset) { _offset = offset; }
 
   // Return the size of the slice
   uint64_t fileSize() const { return _fsize; }
-
   void setFileSize(uint64_t filesz) { _fsize = filesz; }
 
   // Return the start of the slice
@@ -313,7 +309,6 @@ public:
     this->_fsize = this->_sections.back()->fileSize();
     this->_msize = this->_sections.back()->memSize();
   }
-
 };
 
 template <class ELFT>

Modified: lld/trunk/lib/ReaderWriter/ELF/TargetHandler.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/TargetHandler.h?rev=233423&r1=233422&r2=233423&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/TargetHandler.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/TargetHandler.h Fri Mar 27 16:39:13 2015
@@ -42,8 +42,6 @@ template <class ELFT> class TargetLayout
 
 class TargetRelocationHandler {
 public:
-  /// Constructor
-  TargetRelocationHandler() {}
   virtual ~TargetRelocationHandler() {}
 
   virtual std::error_code applyRelocation(ELFWriter &, llvm::FileOutputBuffer &,

Modified: lld/trunk/lib/ReaderWriter/ELF/Writer.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Writer.h?rev=233423&r1=233422&r2=233423&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Writer.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Writer.h Fri Mar 27 16:39:13 2015
@@ -19,9 +19,6 @@ namespace elf {
 ///        various kinds of ELF files.
 class ELFWriter : public Writer {
 public:
-  ELFWriter() {}
-
-public:
   /// \brief builds the chunks that needs to be written to the output
   ///        ELF file
   virtual void buildChunks(const File &file) = 0;





More information about the llvm-commits mailing list