[lld] r261590 - Remove a trivial getter.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 22 15:16:05 PST 2016
Author: rafael
Date: Mon Feb 22 17:16:05 2016
New Revision: 261590
URL: http://llvm.org/viewvc/llvm-project?rev=261590&view=rev
Log:
Remove a trivial getter.
Modified:
lld/trunk/ELF/InputSection.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=261590&r1=261589&r2=261590&view=diff
==============================================================================
--- lld/trunk/ELF/InputSection.cpp (original)
+++ lld/trunk/ELF/InputSection.cpp Mon Feb 22 17:16:05 2016
@@ -216,7 +216,7 @@ void InputSectionBase<ELFT>::relocate(ui
SymVA = Out<ELFT>::Got->getMipsLocalFullAddr(*Body);
else
SymVA = Body->getGotVA<ELFT>();
- if (Body->isTls())
+ if (Body->IsTls)
Type = Target->getTlsGotRel(Type);
} else if (!Target->needsCopyRel(Type, *Body) &&
isa<SharedSymbol<ELFT>>(*Body)) {
Modified: lld/trunk/ELF/SymbolTable.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.cpp?rev=261590&r1=261589&r2=261590&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.cpp (original)
+++ lld/trunk/ELF/SymbolTable.cpp Mon Feb 22 17:16:05 2016
@@ -266,7 +266,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));
return;
}
Modified: lld/trunk/ELF/Symbols.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.h?rev=261590&r1=261589&r2=261590&view=diff
==============================================================================
--- lld/trunk/ELF/Symbols.h (original)
+++ lld/trunk/ELF/Symbols.h Mon Feb 22 17:16:05 2016
@@ -84,7 +84,6 @@ public:
bool isLazy() const { return SymbolKind == LazyKind; }
bool isShared() const { return SymbolKind == SharedKind; }
bool isUsedInRegularObj() const { return IsUsedInRegularObj; }
- bool isTls() const { return IsTls; }
bool isFunc() const { return IsFunc; }
// Returns the symbol name.
@@ -154,8 +153,9 @@ public:
// symbol or if the symbol should point to its plt entry.
unsigned NeedsCopyOrPltAddr : 1;
-protected:
unsigned IsTls : 1;
+
+protected:
unsigned IsFunc : 1;
StringRef Name;
Modified: lld/trunk/ELF/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.cpp?rev=261590&r1=261589&r2=261590&view=diff
==============================================================================
--- lld/trunk/ELF/Target.cpp (original)
+++ lld/trunk/ELF/Target.cpp Mon Feb 22 17:16:05 2016
@@ -428,7 +428,7 @@ bool X86TargetInfo::needsCopyRelImpl(uin
}
bool X86TargetInfo::needsGot(uint32_t Type, SymbolBody &S) const {
- if (S.isTls() && Type == R_386_TLS_GD)
+ if (S.IsTls && Type == R_386_TLS_GD)
return Target->canRelaxTls(Type, &S) && canBePreempted(&S, true);
if (Type == R_386_TLS_GOTIE || Type == R_386_TLS_IE)
return !canRelaxTls(Type, &S);
@@ -500,7 +500,7 @@ void X86TargetInfo::relocateOne(uint8_t
}
bool X86TargetInfo::canRelaxTls(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 ||
@@ -790,7 +790,7 @@ bool X86_64TargetInfo::isSizeRel(uint32_
}
bool X86_64TargetInfo::canRelaxTls(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 ||
@@ -1474,7 +1474,7 @@ void AArch64TargetInfo::relocateOne(uint
}
bool AArch64TargetInfo::canRelaxTls(unsigned Type, const SymbolBody *S) const {
- if (Config->Shared || (S && !S->isTls()))
+ if (Config->Shared || (S && !S->IsTls))
return false;
// Global-Dynamic relocs can be relaxed to Initial-Exec if the target is
Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=261590&r1=261589&r2=261590&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Mon Feb 22 17:16:05 2016
@@ -249,7 +249,7 @@ static bool handleTlsRelocation(unsigned
return true;
}
- if (!Body || !Body->isTls())
+ if (!Body || !Body->IsTls)
return false;
if (Target->isTlsGlobalDynamicRel(Type)) {
@@ -406,7 +406,7 @@ void Writer<ELFT>::scanRelocs(
if (CBP || Dynrel) {
uint32_t DynType;
if (CBP)
- DynType = Body->isTls() ? Target->TlsGotRel : Target->GotRel;
+ DynType = Body->IsTls ? Target->TlsGotRel : Target->GotRel;
else
DynType = Target->RelativeRel;
Out<ELFT>::RelaDyn->addReloc(
More information about the llvm-commits
mailing list