20
20
#include " llvm/ADT/SmallSet.h"
21
21
#include " llvm/ADT/SmallString.h"
22
22
#include " llvm/ADT/StringExtras.h"
23
- #include " llvm/ADT/StringMap.h"
24
23
#include " llvm/ADT/StringRef.h"
25
24
#include " llvm/ADT/StringSet.h"
26
25
#include " llvm/ADT/StringSwitch.h"
@@ -114,9 +113,8 @@ class BuiltinNameEmitter {
114
113
// \param Output (out) String containing the enums to emit in the output file.
115
114
// \param List (out) List containing the extracted Types, except the Types in
116
115
// TypesSeen.
117
- void ExtractEnumTypes (ArrayRef<const Record *> Types,
118
- StringMap<bool > &TypesSeen, std::string &Output,
119
- std::vector<const Record *> &List);
116
+ void ExtractEnumTypes (ArrayRef<const Record *> Types, StringSet<> &TypesSeen,
117
+ std::string &Output, std::vector<const Record *> &List);
120
118
121
119
// Emit the enum or struct used in the generated file.
122
120
// Populate the TypeList at the same time.
@@ -364,7 +362,7 @@ void BuiltinNameEmitter::Emit() {
364
362
}
365
363
366
364
void BuiltinNameEmitter::ExtractEnumTypes (ArrayRef<const Record *> Types,
367
- StringMap< bool > &TypesSeen,
365
+ StringSet< > &TypesSeen,
368
366
std::string &Output,
369
367
std::vector<const Record *> &List) {
370
368
raw_string_ostream SS (Output);
@@ -376,7 +374,7 @@ void BuiltinNameEmitter::ExtractEnumTypes(ArrayRef<const Record *> Types,
376
374
// the Record can be a VectorType or something else, only the name is
377
375
// important.
378
376
List.push_back (T);
379
- TypesSeen.insert (std::make_pair ( T->getValueAsString (" Name" ), true ));
377
+ TypesSeen.insert (T->getValueAsString (" Name" ));
380
378
}
381
379
}
382
380
}
@@ -385,7 +383,7 @@ void BuiltinNameEmitter::EmitDeclarations() {
385
383
// Enum of scalar type names (float, int, ...) and generic type sets.
386
384
OS << " enum OpenCLTypeID {\n " ;
387
385
388
- StringMap< bool > TypesSeen;
386
+ StringSet< > TypesSeen;
389
387
std::string GenTypeEnums;
390
388
std::string TypeEnums;
391
389
0 commit comments