Index: ELF/SymbolTable.cpp =================================================================== --- ELF/SymbolTable.cpp +++ ELF/SymbolTable.cpp @@ -240,7 +240,7 @@ // compare() returns -1, 0, or 1 if the lhs symbol is less preferable, // equivalent (conflicting), or more preferable, respectively. - int Comp = Existing->compare(New); + int Comp = Existing->compare(New); if (Comp == 0) { std::string S = "duplicate symbol: " + conflictMsg(Existing, New); if (Config->AllowMultipleDefinition) Index: ELF/Symbols.h =================================================================== --- ELF/Symbols.h +++ ELF/Symbols.h @@ -121,7 +121,7 @@ // Decides which symbol should "win" in the symbol table, this or // the Other. Returns 1 if this wins, -1 if the Other wins, or 0 if // they are duplicate (conflicting) symbols. - template int compare(SymbolBody *Other); + int compare(SymbolBody *Other); protected: SymbolBody(Kind K, StringRef Name, uint8_t Binding, uint8_t StOther, Index: ELF/Symbols.cpp =================================================================== --- ELF/Symbols.cpp +++ ELF/Symbols.cpp @@ -184,7 +184,7 @@ // Returns 1, 0 or -1 if this symbol should take precedence // over the Other, tie or lose, respectively. -template int SymbolBody::compare(SymbolBody *Other) { +int SymbolBody::compare(SymbolBody *Other) { assert(!isLazy() && !Other->isLazy()); std::tuple L(isDefined(), !isShared(), !isWeak()); std::tuple R(Other->isDefined(), !Other->isShared(), @@ -192,7 +192,7 @@ // Normalize if (L > R) - return -Other->compare(this); + return -Other->compare(this); uint8_t V = getMinVisibility(getVisibility(), Other->getVisibility()); setVisibility(V); @@ -347,11 +347,6 @@ template uint64_t SymbolBody::template getThunkVA() const; template uint64_t SymbolBody::template getThunkVA() const; -template int SymbolBody::compare(SymbolBody *Other); -template int SymbolBody::compare(SymbolBody *Other); -template int SymbolBody::compare(SymbolBody *Other); -template int SymbolBody::compare(SymbolBody *Other); - template class elf::UndefinedElf; template class elf::UndefinedElf; template class elf::UndefinedElf;