[lld] r270532 - Rename EHInputSection -> EhInputSection.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Mon May 23 21:19:21 PDT 2016


Author: ruiu
Date: Mon May 23 23:19:20 2016
New Revision: 270532

URL: http://llvm.org/viewvc/llvm-project?rev=270532&view=rev
Log:
Rename EHInputSection -> EhInputSection.

Modified:
    lld/trunk/ELF/InputFiles.cpp
    lld/trunk/ELF/InputFiles.h
    lld/trunk/ELF/InputSection.cpp
    lld/trunk/ELF/InputSection.h
    lld/trunk/ELF/MarkLive.cpp
    lld/trunk/ELF/OutputSections.cpp
    lld/trunk/ELF/OutputSections.h
    lld/trunk/ELF/Writer.cpp

Modified: lld/trunk/ELF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.cpp?rev=270532&r1=270531&r2=270532&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.cpp (original)
+++ lld/trunk/ELF/InputFiles.cpp Mon May 23 23:19:20 2016
@@ -236,7 +236,7 @@ void elf::ObjectFile<ELFT>::initializeSe
         S->RelocSections.push_back(&Sec);
         break;
       }
-      if (auto *S = dyn_cast<EHInputSection<ELFT>>(Target)) {
+      if (auto *S = dyn_cast<EhInputSection<ELFT>>(Target)) {
         if (S->RelocSection)
           fatal("multiple relocation sections to .eh_frame are not supported");
         S->RelocSection = &Sec;
@@ -305,7 +305,7 @@ elf::ObjectFile<ELFT>::createInputSectio
   // We dont need special handling of .eh_frame sections if relocatable
   // output was choosen. Proccess them as usual input sections.
   if (!Config->Relocatable && Name == ".eh_frame")
-    return new (EHAlloc.Allocate()) EHInputSection<ELFT>(this, &Sec);
+    return new (EHAlloc.Allocate()) EhInputSection<ELFT>(this, &Sec);
   if (shouldMerge<ELFT>(Sec))
     return new (MAlloc.Allocate()) MergeInputSection<ELFT>(this, &Sec);
   return new (IAlloc.Allocate()) InputSection<ELFT>(this, &Sec);

Modified: lld/trunk/ELF/InputFiles.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.h?rev=270532&r1=270531&r2=270532&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.h (original)
+++ lld/trunk/ELF/InputFiles.h Mon May 23 23:19:20 2016
@@ -171,7 +171,7 @@ private:
   llvm::BumpPtrAllocator Alloc;
   llvm::SpecificBumpPtrAllocator<InputSection<ELFT>> IAlloc;
   llvm::SpecificBumpPtrAllocator<MergeInputSection<ELFT>> MAlloc;
-  llvm::SpecificBumpPtrAllocator<EHInputSection<ELFT>> EHAlloc;
+  llvm::SpecificBumpPtrAllocator<EhInputSection<ELFT>> EHAlloc;
 };
 
 // LazyObjectFile is analogous to ArchiveFile in the sense that

Modified: lld/trunk/ELF/InputSection.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.cpp?rev=270532&r1=270531&r2=270532&view=diff
==============================================================================
--- lld/trunk/ELF/InputSection.cpp (original)
+++ lld/trunk/ELF/InputSection.cpp Mon May 23 23:19:20 2016
@@ -61,7 +61,7 @@ typename ELFT::uint InputSectionBase<ELF
   case Regular:
     return cast<InputSection<ELFT>>(this)->OutSecOff + Offset;
   case EHFrame:
-    return cast<EHInputSection<ELFT>>(this)->getOffset(Offset);
+    return cast<EhInputSection<ELFT>>(this)->getOffset(Offset);
   case Merge:
     return cast<MergeInputSection<ELFT>>(this)->getOffset(Offset);
   case MipsReginfo:
@@ -394,7 +394,7 @@ SplitInputSection<ELFT>::SplitInputSecti
     : InputSectionBase<ELFT>(File, Header, SectionKind) {}
 
 template <class ELFT>
-EHInputSection<ELFT>::EHInputSection(elf::ObjectFile<ELFT> *F,
+EhInputSection<ELFT>::EhInputSection(elf::ObjectFile<ELFT> *F,
                                      const Elf_Shdr *Header)
     : SplitInputSection<ELFT>(F, Header, InputSectionBase<ELFT>::EHFrame) {
   // Mark .eh_frame sections as live by default because there are
@@ -404,14 +404,14 @@ EHInputSection<ELFT>::EHInputSection(elf
 }
 
 template <class ELFT>
-bool EHInputSection<ELFT>::classof(const InputSectionBase<ELFT> *S) {
+bool EhInputSection<ELFT>::classof(const InputSectionBase<ELFT> *S) {
   return S->SectionKind == InputSectionBase<ELFT>::EHFrame;
 }
 
 // .eh_frame is a sequence of CIE or FDE records.
 // This function splits an input section into records and returns them.
 template <class ELFT>
-void EHInputSection<ELFT>::split() {
+void EhInputSection<ELFT>::split() {
   ArrayRef<uint8_t> Data = this->getSectionData();
   for (size_t Off = 0, End = Data.size(); Off != End;) {
     size_t Size = readEhRecordSize<ELFT>(Data.slice(Off));
@@ -424,7 +424,7 @@ void EHInputSection<ELFT>::split() {
 }
 
 template <class ELFT>
-typename ELFT::uint EHInputSection<ELFT>::getOffset(uintX_t Offset) {
+typename ELFT::uint EhInputSection<ELFT>::getOffset(uintX_t Offset) {
   // The file crtbeginT.o has relocations pointing to the start of an empty
   // .eh_frame that is known to be the first in the link. It does that to
   // identify the start of the output .eh_frame. Handle this special case.
@@ -598,10 +598,10 @@ template class elf::SplitInputSection<EL
 template class elf::SplitInputSection<ELF64LE>;
 template class elf::SplitInputSection<ELF64BE>;
 
-template class elf::EHInputSection<ELF32LE>;
-template class elf::EHInputSection<ELF32BE>;
-template class elf::EHInputSection<ELF64LE>;
-template class elf::EHInputSection<ELF64BE>;
+template class elf::EhInputSection<ELF32LE>;
+template class elf::EhInputSection<ELF32BE>;
+template class elf::EhInputSection<ELF64LE>;
+template class elf::EhInputSection<ELF64BE>;
 
 template class elf::MergeInputSection<ELF32LE>;
 template class elf::MergeInputSection<ELF32BE>;

Modified: lld/trunk/ELF/InputSection.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.h?rev=270532&r1=270531&r2=270532&view=diff
==============================================================================
--- lld/trunk/ELF/InputSection.h (original)
+++ lld/trunk/ELF/InputSection.h Mon May 23 23:19:20 2016
@@ -186,11 +186,11 @@ private:
 };
 
 // This corresponds to a .eh_frame section of an input file.
-template <class ELFT> class EHInputSection : public SplitInputSection<ELFT> {
+template <class ELFT> class EhInputSection : public SplitInputSection<ELFT> {
 public:
   typedef typename ELFT::Shdr Elf_Shdr;
   typedef typename ELFT::uint uintX_t;
-  EHInputSection(ObjectFile<ELFT> *F, const Elf_Shdr *Header);
+  EhInputSection(ObjectFile<ELFT> *F, const Elf_Shdr *Header);
   static bool classof(const InputSectionBase<ELFT> *S);
   void split();
 

Modified: lld/trunk/ELF/MarkLive.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/MarkLive.cpp?rev=270532&r1=270531&r2=270532&view=diff
==============================================================================
--- lld/trunk/ELF/MarkLive.cpp (original)
+++ lld/trunk/ELF/MarkLive.cpp Mon May 23 23:19:20 2016
@@ -95,7 +95,7 @@ static void forEachSuccessor(InputSectio
 }
 
 template <class ELFT>
-static void scanEhFrameSection(EHInputSection<ELFT> &EH,
+static void scanEhFrameSection(EhInputSection<ELFT> &EH,
                                std::function<void(ResolvedReloc<ELFT>)> Fn) {
   if (!EH.RelocSection)
     return;
@@ -183,7 +183,7 @@ template <class ELFT> void elf::markLive
         // .eh_frame is always marked as live now, but also it can reference to
         // sections that contain personality. We preserve all non-text sections
         // referred by .eh_frame here.
-        if (auto *EH = dyn_cast_or_null<EHInputSection<ELFT>>(Sec))
+        if (auto *EH = dyn_cast_or_null<EhInputSection<ELFT>>(Sec))
           scanEhFrameSection<ELFT>(*EH, Enqueue);
         if (isReserved(Sec) || Script<ELFT>::X->shouldKeep(Sec))
           Enqueue({Sec, 0});

Modified: lld/trunk/ELF/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=270532&r1=270531&r2=270532&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.cpp (original)
+++ lld/trunk/ELF/OutputSections.cpp Mon May 23 23:19:20 2016
@@ -913,7 +913,7 @@ EhOutputSection<ELFT>::EhOutputSection()
 template <class ELFT>
 void EhOutputSection<ELFT>::forEachInputSection(
     std::function<void(InputSectionBase<ELFT> *)> F) {
-  for (EHInputSection<ELFT> *S : Sections)
+  for (EhInputSection<ELFT> *S : Sections)
     F(S);
 }
 
@@ -936,7 +936,7 @@ static const RelTy *getReloc(IntTy Begin
 template <class ELFT>
 template <class RelTy>
 CieRecord *EhOutputSection<ELFT>::addCie(SectionPiece &Piece,
-                                         EHInputSection<ELFT> *Sec,
+                                         EhInputSection<ELFT> *Sec,
                                          ArrayRef<RelTy> Rels) {
   const endianness E = ELFT::TargetEndianness;
   if (read32<E>(Piece.Data.data() + 4) != 0)
@@ -970,7 +970,7 @@ template <class ELFT> static void valida
 template <class ELFT>
 template <class RelTy>
 bool EhOutputSection<ELFT>::isFdeLive(SectionPiece &Piece,
-                                      EHInputSection<ELFT> *Sec,
+                                      EhInputSection<ELFT> *Sec,
                                       ArrayRef<RelTy> Rels) {
   const RelTy *Rel = getReloc(Piece.InputOff, Piece.size(), Rels);
   if (!Rel)
@@ -989,7 +989,7 @@ bool EhOutputSection<ELFT>::isFdeLive(Se
 // one and associates FDEs to the CIE.
 template <class ELFT>
 template <class RelTy>
-void EhOutputSection<ELFT>::addSectionAux(EHInputSection<ELFT> *Sec,
+void EhOutputSection<ELFT>::addSectionAux(EhInputSection<ELFT> *Sec,
                                           ArrayRef<RelTy> Rels) {
   SectionPiece &CiePiece = Sec->Pieces[0];
   CieRecord *Cie = addCie(CiePiece, Sec, Rels);
@@ -1006,7 +1006,7 @@ void EhOutputSection<ELFT>::addSectionAu
 
 template <class ELFT>
 void EhOutputSection<ELFT>::addSection(InputSectionBase<ELFT> *C) {
-  auto *Sec = cast<EHInputSection<ELFT>>(C);
+  auto *Sec = cast<EhInputSection<ELFT>>(C);
   Sec->OutSec = this;
   this->updateAlign(Sec->Align);
   Sections.push_back(Sec);
@@ -1105,7 +1105,7 @@ template <class ELFT> void EhOutputSecti
     }
   }
 
-  for (EHInputSection<ELFT> *S : Sections)
+  for (EhInputSection<ELFT> *S : Sections)
     S->relocate(Buf, nullptr);
 
   // Construct .eh_frame_hdr. .eh_frame_hdr is a binary search table

Modified: lld/trunk/ELF/OutputSections.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.h?rev=270532&r1=270531&r2=270532&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.h (original)
+++ lld/trunk/ELF/OutputSections.h Mon May 23 23:19:20 2016
@@ -27,7 +27,7 @@ struct SectionPiece;
 template <class ELFT> class SymbolTable;
 template <class ELFT> class SymbolTableSection;
 template <class ELFT> class StringTableSection;
-template <class ELFT> class EHInputSection;
+template <class ELFT> class EhInputSection;
 template <class ELFT> class InputSection;
 template <class ELFT> class InputSectionBase;
 template <class ELFT> class MergeInputSection;
@@ -356,19 +356,19 @@ public:
 
 private:
   template <class RelTy>
-  void addSectionAux(EHInputSection<ELFT> *S, llvm::ArrayRef<RelTy> Rels);
+  void addSectionAux(EhInputSection<ELFT> *S, llvm::ArrayRef<RelTy> Rels);
 
   template <class RelTy>
-  CieRecord *addCie(SectionPiece &Piece, EHInputSection<ELFT> *Sec,
+  CieRecord *addCie(SectionPiece &Piece, EhInputSection<ELFT> *Sec,
                     ArrayRef<RelTy> Rels);
 
   template <class RelTy>
-  bool isFdeLive(SectionPiece &Piece, EHInputSection<ELFT> *Sec,
+  bool isFdeLive(SectionPiece &Piece, EhInputSection<ELFT> *Sec,
                  ArrayRef<RelTy> Rels);
 
   uintX_t getFdePc(uint8_t *Buf, size_t Off, uint8_t Enc);
 
-  std::vector<EHInputSection<ELFT> *> Sections;
+  std::vector<EhInputSection<ELFT> *> Sections;
   std::vector<CieRecord *> Cies;
 
   // CIE records are uniquified by their contents and personality functions.

Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=270532&r1=270531&r2=270532&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Mon May 23 23:19:20 2016
@@ -1363,7 +1363,7 @@ template <class ELFT> void Writer<ELFT>:
 
         // Now that scan relocs possibly changed the size, update the offset.
         Sec->setSize(Off + S->getSize());
-      } else if (auto *EH = dyn_cast<EHInputSection<ELFT>>(S)) {
+      } else if (auto *EH = dyn_cast<EhInputSection<ELFT>>(S)) {
         if (EH->RelocSection)
           scanRelocs(*EH, *EH->RelocSection);
       }




More information about the llvm-commits mailing list