Resolver: Use LLVM StringMap and DenseMap.

All defined symbols from all archive files are inserted to _archiveMap,
so performance of hash table matters here (I'm not trying to convert
all std::maps with DenseMaps). This change seems to make the linker
0.5% - 1% faster for my test case.

llvm-svn: 231584
This commit is contained in:
Rui Ueyama 2015-03-08 02:44:51 +00:00
parent 0536677ad6
commit 8ade983734
1 changed files with 2 additions and 2 deletions

View File

@ -100,8 +100,8 @@ private:
size_t _fileIndex;
// Preloading
std::map<StringRef, ArchiveLibraryFile *> _archiveMap;
std::unordered_set<ArchiveLibraryFile *> _archiveSeen;
llvm::StringMap<ArchiveLibraryFile *> _archiveMap;
llvm::DenseSet<ArchiveLibraryFile *> _archiveSeen;
// List of undefined symbols.
std::vector<StringRef> _undefines;