|
8 | 8 |
|
9 | 9 | #include "llvm/Object/IRSymtab.h" |
10 | 10 | #include "llvm/ADT/ArrayRef.h" |
11 | | -#include "llvm/ADT/DenseMap.h" |
12 | 11 | #include "llvm/ADT/SmallPtrSet.h" |
13 | 12 | #include "llvm/ADT/SmallString.h" |
14 | 13 | #include "llvm/ADT/SmallVector.h" |
15 | 14 | #include "llvm/ADT/StringRef.h" |
| 15 | +#include "llvm/ADT/StringSet.h" |
16 | 16 | #include "llvm/Bitcode/BitcodeReader.h" |
17 | 17 | #include "llvm/Config/llvm-config.h" |
18 | 18 | #include "llvm/IR/Comdat.h" |
@@ -213,9 +213,10 @@ Expected<int> Builder::getComdatIndex(const Comdat *C, const Module *M) { |
213 | 213 | return P.first->second; |
214 | 214 | } |
215 | 215 |
|
216 | | -static DenseSet<StringRef> buildPreservedSymbolsSet(const Triple &TT) { |
217 | | - DenseSet<StringRef> PreservedSymbolSet(std::begin(PreservedSymbols), |
218 | | - std::end(PreservedSymbols)); |
| 216 | +static StringSet<> buildPreservedSymbolsSet(const Triple &TT) { |
| 217 | + StringSet<> PreservedSymbolSet; |
| 218 | + PreservedSymbolSet.insert(std::begin(PreservedSymbols), |
| 219 | + std::end(PreservedSymbols)); |
219 | 220 | // FIXME: Do we need to pass in ABI fields from TargetOptions? |
220 | 221 | RTLIB::RuntimeLibcallsInfo Libcalls(TT); |
221 | 222 | for (RTLIB::LibcallImpl Impl : Libcalls.getLibcallImpls()) { |
@@ -280,7 +281,7 @@ Error Builder::addSymbol(const ModuleSymbolTable &Msymtab, |
280 | 281 |
|
281 | 282 | setStr(Sym.IRName, GV->getName()); |
282 | 283 |
|
283 | | - static const DenseSet<StringRef> PreservedSymbolsSet = |
| 284 | + static const StringSet<> PreservedSymbolsSet = |
284 | 285 | buildPreservedSymbolsSet(GV->getParent()->getTargetTriple()); |
285 | 286 | bool IsPreservedSymbol = PreservedSymbolsSet.contains(GV->getName()); |
286 | 287 |
|
|
0 commit comments