[lld] r313586 - Remove useless accessor.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 18 16:07:10 PDT 2017


Author: ruiu
Date: Mon Sep 18 16:07:09 2017
New Revision: 313586

URL: http://llvm.org/viewvc/llvm-project?rev=313586&view=rev
Log:
Remove useless accessor.

Modified:
    lld/trunk/ELF/InputSection.h
    lld/trunk/ELF/MarkLive.cpp
    lld/trunk/ELF/Relocations.cpp
    lld/trunk/ELF/SyntheticSections.cpp

Modified: lld/trunk/ELF/InputSection.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.h?rev=313586&r1=313585&r2=313586&view=diff
==============================================================================
--- lld/trunk/ELF/InputSection.h (original)
+++ lld/trunk/ELF/InputSection.h Mon Sep 18 16:07:09 2017
@@ -268,7 +268,6 @@ struct EhSectionPiece : public SectionPi
         FirstRelocation(FirstRelocation) {}
   InputSectionBase *ID;
   uint32_t Size;
-  uint32_t size() const { return Size; }
 
   ArrayRef<uint8_t> data() { return {ID->Data.data() + this->InputOff, Size}; }
   unsigned FirstRelocation;

Modified: lld/trunk/ELF/MarkLive.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/MarkLive.cpp?rev=313586&r1=313585&r2=313586&view=diff
==============================================================================
--- lld/trunk/ELF/MarkLive.cpp (original)
+++ lld/trunk/ELF/MarkLive.cpp Mon Sep 18 16:07:09 2017
@@ -135,7 +135,7 @@ scanEhFrameSection(EhInputSection &EH, A
     // This is a FDE. The relocations point to the described function or to
     // a LSDA. We only need to keep the LSDA alive, so ignore anything that
     // points to executable sections.
-    typename ELFT::uint PieceEnd = Piece.InputOff + Piece.size();
+    typename ELFT::uint PieceEnd = Piece.InputOff + Piece.Size;
     for (unsigned I2 = FirstRelI, N2 = Rels.size(); I2 < N2; ++I2) {
       const RelTy &Rel = Rels[I2];
       if (Rel.r_offset >= PieceEnd)

Modified: lld/trunk/ELF/Relocations.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Relocations.cpp?rev=313586&r1=313585&r2=313586&view=diff
==============================================================================
--- lld/trunk/ELF/Relocations.cpp (original)
+++ lld/trunk/ELF/Relocations.cpp Mon Sep 18 16:07:09 2017
@@ -765,7 +765,7 @@ public:
     if (P.empty())
       return Off;
 
-    while (I != Size && P[I].InputOff + P[I].size() <= Off)
+    while (I != Size && P[I].InputOff + P[I].Size <= Off)
       ++I;
     if (I == Size)
       return Off;

Modified: lld/trunk/ELF/SyntheticSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SyntheticSections.cpp?rev=313586&r1=313585&r2=313586&view=diff
==============================================================================
--- lld/trunk/ELF/SyntheticSections.cpp (original)
+++ lld/trunk/ELF/SyntheticSections.cpp Mon Sep 18 16:07:09 2017
@@ -465,7 +465,7 @@ void EhFrameSection<ELFT>::addSectionAux
   DenseMap<size_t, CieRecord *> OffsetToCie;
   for (EhSectionPiece &Piece : Sec->Pieces) {
     // The empty record is the end marker.
-    if (Piece.size() == 4)
+    if (Piece.Size == 4)
       return;
 
     size_t Offset = Piece.InputOff;
@@ -534,11 +534,11 @@ template <class ELFT> void EhFrameSectio
   size_t Off = 0;
   for (CieRecord *Cie : Cies) {
     Cie->Piece->OutputOff = Off;
-    Off += alignTo(Cie->Piece->size(), Config->Wordsize);
+    Off += alignTo(Cie->Piece->Size, Config->Wordsize);
 
     for (EhSectionPiece *Fde : Cie->FdePieces) {
       Fde->OutputOff = Off;
-      Off += alignTo(Fde->size(), Config->Wordsize);
+      Off += alignTo(Fde->Size, Config->Wordsize);
     }
   }
 




More information about the llvm-commits mailing list