From c09ce7fd2d62d85dcdf370f4bef732380fca4f1b Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Fri, 6 Jan 2017 20:14:02 +0000 Subject: Vendor import of lld trunk r291274: https://llvm.org/svn/llvm-project/lld/trunk@291274 --- ELF/OutputSections.h | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) (limited to 'ELF/OutputSections.h') diff --git a/ELF/OutputSections.h b/ELF/OutputSections.h index 978b1f8191ef..45e1a232e2a9 100644 --- a/ELF/OutputSections.h +++ b/ELF/OutputSections.h @@ -217,12 +217,10 @@ template struct Out { static OutputSectionBase *FiniArray; }; -template struct SectionKey { - typedef typename std::conditional::type uintX_t; +struct SectionKey { StringRef Name; - uint32_t Type; - uintX_t Flags; - uintX_t Alignment; + uint64_t Flags; + uint64_t Alignment; }; // This class knows how to create an output section for a given @@ -232,16 +230,17 @@ template struct SectionKey { template class OutputSectionFactory { typedef typename ELFT::Shdr Elf_Shdr; typedef typename ELFT::uint uintX_t; - typedef typename elf::SectionKey Key; public: + OutputSectionFactory(); + ~OutputSectionFactory(); std::pair create(InputSectionBase *C, StringRef OutsecName); - std::pair - create(const SectionKey &Key, InputSectionBase *C); + std::pair create(const SectionKey &Key, + InputSectionBase *C); private: - llvm::SmallDenseMap Map; + llvm::SmallDenseMap Map; }; template uint64_t getHeaderSize() { @@ -265,15 +264,5 @@ template OutputSectionBase *Out::FiniArray; } // namespace elf } // namespace lld -namespace llvm { -template struct DenseMapInfo> { - typedef typename lld::elf::SectionKey Key; - - static Key getEmptyKey(); - static Key getTombstoneKey(); - static unsigned getHashValue(const Key &Val); - static bool isEqual(const Key &LHS, const Key &RHS); -}; -} #endif -- cgit v1.3