summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2017-03-16 11:06:13 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2017-03-16 11:06:13 +0000
commit69268a8ab31c4e3c4fad146284ae294536df6e6a (patch)
tree4994d8025c6f623750672584cb84bc5363d832d6
parenta92dc2bbd32237362e7d7730e8dec3f2fd0f1ae9 (diff)
downloadbcm5719-llvm-69268a8ab31c4e3c4fad146284ae294536df6e6a.tar.gz
bcm5719-llvm-69268a8ab31c4e3c4fad146284ae294536df6e6a.zip
[ELF] - Detemplate SymbolBody::getOutputSection(). NFC.
llvm-svn: 297943
-rw-r--r--lld/ELF/LinkerScript.cpp2
-rw-r--r--lld/ELF/Symbols.cpp9
-rw-r--r--lld/ELF/Symbols.h2
-rw-r--r--lld/ELF/SyntheticSections.cpp2
4 files changed, 5 insertions, 10 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index 69ac57c2f4f..4519a2b892b 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -939,7 +939,7 @@ template <class ELFT> bool LinkerScript<ELFT>::isAbsolute(StringRef S) {
template <class ELFT>
OutputSection *LinkerScript<ELFT>::getSymbolSection(StringRef S) {
if (SymbolBody *Sym = Symtab<ELFT>::X->find(S))
- return Sym->getOutputSection<ELFT>();
+ return Sym->getOutputSection();
return CurOutSec;
}
diff --git a/lld/ELF/Symbols.cpp b/lld/ELF/Symbols.cpp
index 56607e9b6c6..a0cff7ee16c 100644
--- a/lld/ELF/Symbols.cpp
+++ b/lld/ELF/Symbols.cpp
@@ -198,7 +198,7 @@ template <class ELFT> typename ELFT::uint SymbolBody::getSize() const {
return 0;
}
-template <class ELFT> OutputSection *SymbolBody::getOutputSection() const {
+OutputSection *SymbolBody::getOutputSection() const {
if (auto *S = dyn_cast<DefinedRegular>(this)) {
if (S->Section)
return S->Section->getOutputSection();
@@ -213,7 +213,7 @@ template <class ELFT> OutputSection *SymbolBody::getOutputSection() const {
if (isa<DefinedCommon>(this)) {
if (Config->DefineCommon)
- return In<ELFT>::Common->OutSec;
+ return InX::Common->OutSec;
return nullptr;
}
@@ -411,11 +411,6 @@ template uint32_t SymbolBody::template getSize<ELF32BE>() const;
template uint64_t SymbolBody::template getSize<ELF64LE>() const;
template uint64_t SymbolBody::template getSize<ELF64BE>() const;
-template OutputSection *SymbolBody::template getOutputSection<ELF32LE>() const;
-template OutputSection *SymbolBody::template getOutputSection<ELF32BE>() const;
-template OutputSection *SymbolBody::template getOutputSection<ELF64LE>() const;
-template OutputSection *SymbolBody::template getOutputSection<ELF64BE>() const;
-
template bool DefinedRegular::template isMipsPIC<ELF32LE>() const;
template bool DefinedRegular::template isMipsPIC<ELF32BE>() const;
template bool DefinedRegular::template isMipsPIC<ELF64LE>() const;
diff --git a/lld/ELF/Symbols.h b/lld/ELF/Symbols.h
index b1159963392..4f48011d231 100644
--- a/lld/ELF/Symbols.h
+++ b/lld/ELF/Symbols.h
@@ -83,7 +83,7 @@ public:
template <class ELFT> typename ELFT::uint getGotPltVA() const;
template <class ELFT> typename ELFT::uint getPltVA() const;
template <class ELFT> typename ELFT::uint getSize() const;
- template <class ELFT> OutputSection *getOutputSection() const;
+ OutputSection *getOutputSection() const;
// The file from which this symbol was created.
InputFile *File = nullptr;
diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp
index 48f9b11aa81..f7b92237ed6 100644
--- a/lld/ELF/SyntheticSections.cpp
+++ b/lld/ELF/SyntheticSections.cpp
@@ -1389,7 +1389,7 @@ template <class ELFT> void SymbolTableSection<ELFT>::writeTo(uint8_t *Buf) {
ESym->st_size = Body->getSize<ELFT>();
// Set a section index.
- if (const OutputSection *OutSec = Body->getOutputSection<ELFT>())
+ if (const OutputSection *OutSec = Body->getOutputSection())
ESym->st_shndx = OutSec->SectionIndex;
else if (isa<DefinedRegular>(Body))
ESym->st_shndx = SHN_ABS;
OpenPOWER on IntegriCloud