diff options
| author | Rui Ueyama <ruiu@google.com> | 2016-12-21 08:40:09 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2016-12-21 08:40:09 +0000 |
| commit | 4f2f50dc648028fb1e464ee94e5e040cccfc0cea (patch) | |
| tree | add814e03ae7dc487b60a46b17b424b6f9fbac7b /lld/ELF/Symbols.cpp | |
| parent | 3b95157090110e8e9f41903ec2d04db372470b03 (diff) | |
| download | bcm5719-llvm-4f2f50dc648028fb1e464ee94e5e040cccfc0cea.tar.gz bcm5719-llvm-4f2f50dc648028fb1e464ee94e5e040cccfc0cea.zip | |
De-template DefinedSynthetic.
DefinedSynthetic is not created for a real ELF object, so it doesn't
have to be a template function. It has a virtual st_value, which is
either 32 bit or 64 bit, but we can simply use 64 bit.
llvm-svn: 290241
Diffstat (limited to 'lld/ELF/Symbols.cpp')
| -rw-r--r-- | lld/ELF/Symbols.cpp | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/lld/ELF/Symbols.cpp b/lld/ELF/Symbols.cpp index b540a01d189..a2133f411c2 100644 --- a/lld/ELF/Symbols.cpp +++ b/lld/ELF/Symbols.cpp @@ -35,11 +35,11 @@ static typename ELFT::uint getSymVA(const SymbolBody &Body, switch (Body.kind()) { case SymbolBody::DefinedSyntheticKind: { - auto &D = cast<DefinedSynthetic<ELFT>>(Body); + auto &D = cast<DefinedSynthetic>(Body); const OutputSectionBase *Sec = D.Section; if (!Sec) return D.Value; - if (D.Value == DefinedSynthetic<ELFT>::SectionEnd) + if (D.Value == uintX_t(-1)) return Sec->Addr + Sec->Size; return Sec->Addr + D.Value; } @@ -238,13 +238,6 @@ Undefined::Undefined(StringRefZ Name, bool IsLocal, uint8_t StOther, this->File = File; } -template <typename ELFT> -DefinedSynthetic<ELFT>::DefinedSynthetic(StringRef Name, uintX_t Value, - const OutputSectionBase *Section) - : Defined(SymbolBody::DefinedSyntheticKind, Name, /*IsLocal=*/false, - STV_HIDDEN, 0 /* Type */), - Value(Value), Section(Section) {} - DefinedCommon::DefinedCommon(StringRef Name, uint64_t Size, uint64_t Alignment, uint8_t StOther, uint8_t Type, InputFile *File) : Defined(SymbolBody::DefinedCommonKind, Name, /*IsLocal=*/false, StOther, @@ -365,8 +358,3 @@ template class elf::DefinedRegular<ELF32LE>; template class elf::DefinedRegular<ELF32BE>; template class elf::DefinedRegular<ELF64LE>; template class elf::DefinedRegular<ELF64BE>; - -template class elf::DefinedSynthetic<ELF32LE>; -template class elf::DefinedSynthetic<ELF32BE>; -template class elf::DefinedSynthetic<ELF64LE>; -template class elf::DefinedSynthetic<ELF64BE>; |

