Remove unnecessary template. NFC.

llvm-svn: 296117
This commit is contained in:
Rafael Espindola 2017-02-24 13:19:33 +00:00
parent 8ed8374057
commit a2e3fee072
1 changed files with 5 additions and 6 deletions

View File

@ -216,14 +216,13 @@ static bool isCrtend(StringRef S) { return isCrtBeginEnd(S, "crtend"); }
// .ctors are duplicate features (and .init_array is newer.) However, there
// are too many real-world use cases of .ctors, so we had no choice to
// support that with this rather ad-hoc semantics.
template <class ELFT>
static bool compCtors(const InputSection *A, const InputSection *B) {
bool BeginA = isCrtbegin(A->template getFile<ELFT>()->getName());
bool BeginB = isCrtbegin(B->template getFile<ELFT>()->getName());
bool BeginA = isCrtbegin(A->File->getName());
bool BeginB = isCrtbegin(B->File->getName());
if (BeginA != BeginB)
return BeginA;
bool EndA = isCrtend(A->template getFile<ELFT>()->getName());
bool EndB = isCrtend(B->template getFile<ELFT>()->getName());
bool EndA = isCrtend(A->File->getName());
bool EndB = isCrtend(B->File->getName());
if (EndA != EndB)
return EndB;
StringRef X = A->Name;
@ -241,7 +240,7 @@ static bool compCtors(const InputSection *A, const InputSection *B) {
// Unfortunately, the rules are different from the one for .{init,fini}_array.
// Read the comment above.
template <class ELFT> void OutputSection<ELFT>::sortCtorsDtors() {
std::stable_sort(Sections.begin(), Sections.end(), compCtors<ELFT>);
std::stable_sort(Sections.begin(), Sections.end(), compCtors);
}
// Fill [Buf, Buf + Size) with Filler. Filler is written in big