[lld] r232863 - [ELF] Use MapVector.

Shankar Easwaran shankare at codeaurora.org
Fri Mar 20 16:46:58 PDT 2015


Author: shankare
Date: Fri Mar 20 18:46:58 2015
New Revision: 232863

URL: http://llvm.org/viewvc/llvm-project?rev=232863&view=rev
Log:
[ELF] Use MapVector.

Order is still deterministic and we dont need a sorted order.

Modified:
    lld/trunk/lib/ReaderWriter/ELF/ELFFile.h

Modified: lld/trunk/lib/ReaderWriter/ELF/ELFFile.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ELFFile.h?rev=232863&r1=232862&r2=232863&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ELFFile.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ELFFile.h Fri Mar 20 18:46:58 2015
@@ -11,6 +11,7 @@
 #define LLD_READER_WRITER_ELF_FILE_H
 
 #include "Atoms.h"
+#include <llvm/ADT/MapVector.h>
 #include <map>
 #include <unordered_map>
 
@@ -408,7 +409,7 @@ protected:
 
   /// \brief the section and the symbols that are contained within it to create
   /// used to create atoms
-  std::map<const Elf_Shdr *, std::vector<Elf_Sym_Iter>> _sectionSymbols;
+  llvm::MapVector<const Elf_Shdr *, std::vector<Elf_Sym_Iter>> _sectionSymbols;
 
   /// \brief Sections that have merge string property
   std::vector<const Elf_Shdr *> _mergeStringSections;





More information about the llvm-commits mailing list