diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2017-07-25 23:15:35 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2017-07-25 23:15:35 +0000 |
| commit | d4fbe4fe82e3b59d92603216b22ca1cfcc6eeee3 (patch) | |
| tree | 0d26819176046374f15f293258450e120bcf505d | |
| parent | 455210e18fe7217dbb94fd6abfd62f61b16e59a6 (diff) | |
| download | bcm5719-llvm-d4fbe4fe82e3b59d92603216b22ca1cfcc6eeee3.tar.gz bcm5719-llvm-d4fbe4fe82e3b59d92603216b22ca1cfcc6eeee3.zip | |
Reduce templating. NFC.
llvm-svn: 309051
| -rw-r--r-- | lld/ELF/SymbolTable.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lld/ELF/SymbolTable.cpp b/lld/ELF/SymbolTable.cpp index fe1c06571ba..5b50de9159d 100644 --- a/lld/ELF/SymbolTable.cpp +++ b/lld/ELF/SymbolTable.cpp @@ -358,9 +358,8 @@ static int compareDefined(Symbol *S, bool WasInserted, uint8_t Binding, // We have a new non-common defined symbol with the specified binding. Return 1 // if the new symbol should win, -1 if the new symbol should lose, or 0 if there // is a conflict. If the new symbol wins, also update the binding. -template <typename ELFT> static int compareDefinedNonCommon(Symbol *S, bool WasInserted, uint8_t Binding, - bool IsAbsolute, typename ELFT::uint Value, + bool IsAbsolute, uint64_t Value, StringRef Name) { if (int Cmp = compareDefined(S, WasInserted, Binding, Name)) { if (Cmp > 0) @@ -466,8 +465,8 @@ Symbol *SymbolTable<ELFT>::addRegular(StringRef Name, uint8_t StOther, bool WasInserted; std::tie(S, WasInserted) = insert(Name, Type, getVisibility(StOther), /*CanOmitFromDynSym*/ false, File); - int Cmp = compareDefinedNonCommon<ELFT>(S, WasInserted, Binding, - Section == nullptr, Value, Name); + int Cmp = compareDefinedNonCommon(S, WasInserted, Binding, Section == nullptr, + Value, Name); if (Cmp > 0) replaceBody<DefinedRegular>(S, Name, /*IsLocal=*/false, StOther, Type, Value, Size, Section, File); @@ -512,8 +511,8 @@ Symbol *SymbolTable<ELFT>::addBitcode(StringRef Name, uint8_t Binding, bool WasInserted; std::tie(S, WasInserted) = insert(Name, Type, getVisibility(StOther), CanOmitFromDynSym, F); - int Cmp = compareDefinedNonCommon<ELFT>(S, WasInserted, Binding, - /*IsAbs*/ false, /*Value*/ 0, Name); + int Cmp = compareDefinedNonCommon(S, WasInserted, Binding, + /*IsAbs*/ false, /*Value*/ 0, Name); if (Cmp > 0) replaceBody<DefinedRegular>(S, Name, /*IsLocal=*/false, StOther, Type, 0, 0, nullptr, F); |

