From: Rafael Espindola Date: Tue, 11 Aug 2015 17:51:57 +0000 (+0000) Subject: Remove unused templating. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=791e9f9c5928fad353d214baddaa87816b21daa7;p=platform%2Fupstream%2Fllvm.git Remove unused templating. llvm-svn: 244639 --- diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp index 3a11967..38d9b7a 100644 --- a/lld/ELF/InputFiles.cpp +++ b/lld/ELF/InputFiles.cpp @@ -81,10 +81,10 @@ SymbolBody *elf2::ObjectFile::createSymbolBody(StringRef StringTable, case STB_GLOBAL: if (Sym->isUndefined()) return new (Alloc) Undefined(Name); - return new (Alloc) DefinedRegular(Name); + return new (Alloc) DefinedRegular(Name); case STB_WEAK: // FIXME: add support for weak undefined - return new (Alloc) DefinedWeak(Name); + return new (Alloc) DefinedWeak(Name); } } diff --git a/lld/ELF/Symbols.cpp b/lld/ELF/Symbols.cpp index 0964437..a2cee7f 100644 --- a/lld/ELF/Symbols.cpp +++ b/lld/ELF/Symbols.cpp @@ -17,13 +17,10 @@ using namespace llvm::object; using namespace lld; using namespace lld::elf2; -template -DefinedRegular::DefinedRegular(StringRef Name) +DefinedRegular::DefinedRegular(StringRef Name) : Defined(DefinedRegularKind, Name) {} -template -DefinedWeak::DefinedWeak(StringRef Name) - : Defined(DefinedWeakKind, Name) {} +DefinedWeak::DefinedWeak(StringRef Name) : Defined(DefinedWeakKind, Name) {} // Returns 1, 0 or -1 if this symbol should take precedence // over the Other, tie or lose, respectively. @@ -49,17 +46,3 @@ int SymbolBody::compare(SymbolBody *Other) { } llvm_unreachable("unknown symbol kind"); } - -namespace lld { -namespace elf2 { -template class DefinedRegular; -template class DefinedRegular; -template class DefinedRegular; -template class DefinedRegular; - -template class DefinedWeak; -template class DefinedWeak; -template class DefinedWeak; -template class DefinedWeak; -} -} diff --git a/lld/ELF/Symbols.h b/lld/ELF/Symbols.h index 18e31da..5014366 100644 --- a/lld/ELF/Symbols.h +++ b/lld/ELF/Symbols.h @@ -84,7 +84,7 @@ public: }; // Regular defined symbols read from object file symbol tables. -template class DefinedRegular : public Defined { +class DefinedRegular : public Defined { public: DefinedRegular(StringRef Name); @@ -93,7 +93,7 @@ public: } }; -template class DefinedWeak : public Defined { +class DefinedWeak : public Defined { public: DefinedWeak(StringRef Name);