[lld] r297719 - [ELF] - Remove unnecessary template #3. NFC.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 14 02:25:03 PDT 2017
Author: grimar
Date: Tue Mar 14 04:25:03 2017
New Revision: 297719
URL: http://llvm.org/viewvc/llvm-project?rev=297719&view=rev
Log:
[ELF] - Remove unnecessary template #3. NFC.
Modified:
lld/trunk/ELF/OutputSections.cpp
Modified: lld/trunk/ELF/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=297719&r1=297718&r2=297719&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.cpp (original)
+++ lld/trunk/ELF/OutputSections.cpp Tue Mar 14 04:25:03 2017
@@ -253,7 +253,6 @@ static uint64_t getOutFlags(InputSection
return S->Flags & ~SHF_GROUP & ~SHF_COMPRESSED;
}
-template <class ELFT>
static SectionKey createKey(InputSectionBase *C, StringRef OutsecName) {
// The ELF spec just says
// ----------------------------------------------------------------
@@ -298,12 +297,10 @@ static SectionKey createKey(InputSection
// Given the above issues, we instead merge sections by name and error on
// incompatible types and flags.
- typedef typename ELFT::uint uintX_t;
-
uint32_t Alignment = 0;
- uintX_t Flags = 0;
+ uint64_t Flags = 0;
if (Config->Relocatable && (C->Flags & SHF_MERGE)) {
- Alignment = std::max<uintX_t>(C->Alignment, C->Entsize);
+ Alignment = std::max<uint64_t>(C->Alignment, C->Entsize);
Flags = C->Flags & (SHF_MERGE | SHF_STRINGS);
}
@@ -345,7 +342,7 @@ void OutputSectionFactory::addInputSec(I
return;
}
- SectionKey Key = createKey<ELFT>(IS, OutsecName);
+ SectionKey Key = createKey(IS, OutsecName);
uint64_t Flags = getOutFlags(IS);
OutputSection *&Sec = Map[Key];
if (Sec) {
More information about the llvm-commits
mailing list