[lld] r255855 - ELF: Rename isTLS -> isTls for consistency.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 16 16:04:19 PST 2015


Author: ruiu
Date: Wed Dec 16 18:04:18 2015
New Revision: 255855

URL: http://llvm.org/viewvc/llvm-project?rev=255855&view=rev
Log:
ELF: Rename isTLS -> isTls for consistency.

Modified:
    lld/trunk/ELF/InputSection.cpp
    lld/trunk/ELF/OutputSections.cpp
    lld/trunk/ELF/SymbolTable.cpp
    lld/trunk/ELF/Symbols.h
    lld/trunk/ELF/Target.cpp
    lld/trunk/ELF/Writer.cpp

Modified: lld/trunk/ELF/InputSection.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.cpp?rev=255855&r1=255854&r2=255855&view=diff
==============================================================================
--- lld/trunk/ELF/InputSection.cpp (original)
+++ lld/trunk/ELF/InputSection.cpp Wed Dec 16 18:04:18 2015
@@ -197,7 +197,7 @@ void InputSectionBase<ELFT>::relocate(ui
       Type = Target->getPltRefReloc(Type);
     } else if (Target->relocNeedsGot(Type, Body)) {
       SymVA = Out<ELFT>::Got->getEntryAddr(Body);
-      if (Body.isTLS())
+      if (Body.isTls())
         Type = Target->getTlsGotReloc();
     } else if (!Target->relocNeedsCopy(Type, Body) &&
                isa<SharedSymbol<ELFT>>(Body)) {

Modified: lld/trunk/ELF/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=255855&r1=255854&r2=255855&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.cpp (original)
+++ lld/trunk/ELF/OutputSections.cpp Wed Dec 16 18:04:18 2015
@@ -271,7 +271,7 @@ template <class ELFT> void RelocationSec
     else if (LazyReloc)
       Reloc = Target->getPltReloc();
     else if (NeedsGot)
-      Reloc = Body->isTLS() ? Target->getTlsGotReloc() : Target->getGotReloc();
+      Reloc = Body->isTls() ? Target->getTlsGotReloc() : Target->getGotReloc();
     else if (NeedsCopy)
       Reloc = Target->getCopyReloc();
     else

Modified: lld/trunk/ELF/SymbolTable.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.cpp?rev=255855&r1=255854&r2=255855&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.cpp (original)
+++ lld/trunk/ELF/SymbolTable.cpp Wed Dec 16 18:04:18 2015
@@ -173,7 +173,7 @@ template <class ELFT> void SymbolTable<E
     return;
   }
 
-  if (New->isTLS() != Existing->isTLS())
+  if (New->isTls() != Existing->isTls())
     error("TLS attribute mismatch for symbol: " + conflictMsg(Existing, New));
 
   // compare() returns -1, 0, or 1 if the lhs symbol is less preferable,

Modified: lld/trunk/ELF/Symbols.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.h?rev=255855&r1=255854&r2=255855&view=diff
==============================================================================
--- lld/trunk/ELF/Symbols.h (original)
+++ lld/trunk/ELF/Symbols.h Wed Dec 16 18:04:18 2015
@@ -77,7 +77,7 @@ public:
   bool isUsedInRegularObj() const { return IsUsedInRegularObj; }
   bool isUsedInDynamicReloc() const { return IsUsedInDynamicReloc; }
   void setUsedInDynamicReloc() { IsUsedInDynamicReloc = true; }
-  bool isTLS() const { return IsTLS; }
+  bool isTls() const { return IsTLS; }
 
   // Returns the symbol name.
   StringRef getName() const { return Name; }

Modified: lld/trunk/ELF/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.cpp?rev=255855&r1=255854&r2=255855&view=diff
==============================================================================
--- lld/trunk/ELF/Target.cpp (original)
+++ lld/trunk/ELF/Target.cpp Wed Dec 16 18:04:18 2015
@@ -335,7 +335,7 @@ bool X86TargetInfo::relocNeedsCopy(uint3
 }
 
 bool X86TargetInfo::relocNeedsGot(uint32_t Type, const SymbolBody &S) const {
-  if (S.isTLS() && Type == R_386_TLS_GD)
+  if (S.isTls() && Type == R_386_TLS_GD)
     return Target->isTlsOptimized(Type, &S) && canBePreempted(&S, true);
   if (Type == R_386_TLS_GOTIE)
     return !isTlsOptimized(Type, &S);
@@ -388,7 +388,7 @@ void X86TargetInfo::relocateOne(uint8_t
 }
 
 bool X86TargetInfo::isTlsOptimized(unsigned Type, const SymbolBody *S) const {
-  if (Config->Shared || (S && !S->isTLS()))
+  if (Config->Shared || (S && !S->isTls()))
     return false;
   return Type == R_386_TLS_LDO_32 || Type == R_386_TLS_LDM ||
          Type == R_386_TLS_GD ||
@@ -647,7 +647,7 @@ bool X86_64TargetInfo::isSizeDynReloc(ui
 
 bool X86_64TargetInfo::isTlsOptimized(unsigned Type,
                                       const SymbolBody *S) const {
-  if (Config->Shared || (S && !S->isTLS()))
+  if (Config->Shared || (S && !S->isTls()))
     return false;
   return Type == R_X86_64_TLSGD || Type == R_X86_64_TLSLD ||
          Type == R_X86_64_DTPOFF32 ||

Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=255855&r1=255854&r2=255855&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Wed Dec 16 18:04:18 2015
@@ -224,7 +224,7 @@ void Writer<ELFT>::scanRelocs(
     if (Body)
       Body = Body->repl();
 
-    if (Body && Body->isTLS() && Target->isTlsGlobalDynamicReloc(Type)) {
+    if (Body && Body->isTls() && Target->isTlsGlobalDynamicReloc(Type)) {
       bool Opt = Target->isTlsOptimized(Type, Body);
       if (!Opt && Out<ELFT>::Got->addDynTlsEntry(Body)) {
         Out<ELFT>::RelaDyn->addReloc({&C, &RI});
@@ -236,7 +236,7 @@ void Writer<ELFT>::scanRelocs(
         continue;
     }
 
-    if (Body && Body->isTLS() && !Target->isTlsDynReloc(Type))
+    if (Body && Body->isTls() && !Target->isTlsDynReloc(Type))
       continue;
 
     bool NeedsGot = false;




More information about the llvm-commits mailing list