[lld] r244639 - Remove unused templating.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 11 10:51:57 PDT 2015
Author: rafael
Date: Tue Aug 11 12:51:57 2015
New Revision: 244639
URL: http://llvm.org/viewvc/llvm-project?rev=244639&view=rev
Log:
Remove unused templating.
Modified:
lld/trunk/ELF/InputFiles.cpp
lld/trunk/ELF/Symbols.cpp
lld/trunk/ELF/Symbols.h
Modified: lld/trunk/ELF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.cpp?rev=244639&r1=244638&r2=244639&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.cpp (original)
+++ lld/trunk/ELF/InputFiles.cpp Tue Aug 11 12:51:57 2015
@@ -81,10 +81,10 @@ SymbolBody *elf2::ObjectFile<ELFT>::crea
case STB_GLOBAL:
if (Sym->isUndefined())
return new (Alloc) Undefined(Name);
- return new (Alloc) DefinedRegular<ELFT>(Name);
+ return new (Alloc) DefinedRegular(Name);
case STB_WEAK:
// FIXME: add support for weak undefined
- return new (Alloc) DefinedWeak<ELFT>(Name);
+ return new (Alloc) DefinedWeak(Name);
}
}
Modified: lld/trunk/ELF/Symbols.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.cpp?rev=244639&r1=244638&r2=244639&view=diff
==============================================================================
--- lld/trunk/ELF/Symbols.cpp (original)
+++ lld/trunk/ELF/Symbols.cpp Tue Aug 11 12:51:57 2015
@@ -17,13 +17,10 @@ using namespace llvm::object;
using namespace lld;
using namespace lld::elf2;
-template <class ELFT>
-DefinedRegular<ELFT>::DefinedRegular(StringRef Name)
+DefinedRegular::DefinedRegular(StringRef Name)
: Defined(DefinedRegularKind, Name) {}
-template <class ELFT>
-DefinedWeak<ELFT>::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 *Othe
}
llvm_unreachable("unknown symbol kind");
}
-
-namespace lld {
-namespace elf2 {
-template class DefinedRegular<llvm::object::ELF32LE>;
-template class DefinedRegular<llvm::object::ELF32BE>;
-template class DefinedRegular<llvm::object::ELF64LE>;
-template class DefinedRegular<llvm::object::ELF64BE>;
-
-template class DefinedWeak<llvm::object::ELF32LE>;
-template class DefinedWeak<llvm::object::ELF32BE>;
-template class DefinedWeak<llvm::object::ELF64LE>;
-template class DefinedWeak<llvm::object::ELF64BE>;
-}
-}
Modified: lld/trunk/ELF/Symbols.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.h?rev=244639&r1=244638&r2=244639&view=diff
==============================================================================
--- lld/trunk/ELF/Symbols.h (original)
+++ lld/trunk/ELF/Symbols.h Tue Aug 11 12:51:57 2015
@@ -84,7 +84,7 @@ public:
};
// Regular defined symbols read from object file symbol tables.
-template <class ELFT> class DefinedRegular : public Defined {
+class DefinedRegular : public Defined {
public:
DefinedRegular(StringRef Name);
@@ -93,7 +93,7 @@ public:
}
};
-template <class ELFT> class DefinedWeak : public Defined {
+class DefinedWeak : public Defined {
public:
DefinedWeak(StringRef Name);
More information about the llvm-commits
mailing list