Use llvm::StringSet instead of std::set.

std::set is pretty slow. We generally prefer llvm::StringSet if we don't
need an sorted set.

Differential Revision: https://reviews.llvm.org/D40579

llvm-svn: 319371
This commit is contained in:
Rui Ueyama 2017-11-29 22:21:37 +00:00
parent 07b7ee4394
commit 7d5a13799a
1 changed files with 2 additions and 3 deletions

View File

@ -11,14 +11,13 @@
#define LLD_WASM_CONFIG_H
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/BinaryFormat/Wasm.h"
#include "Symbols.h"
using llvm::wasm::WasmGlobal;
#include <set>
namespace lld {
namespace wasm {
@ -38,7 +37,7 @@ struct Configuration {
llvm::StringRef OutputFile;
llvm::StringRef Sysroot;
std::set<llvm::StringRef> AllowUndefinedSymbols;
llvm::StringSet<> AllowUndefinedSymbols;
std::vector<llvm::StringRef> SearchPaths;
std::vector<std::pair<Symbol *, WasmGlobal>> SyntheticGlobals;
};