2020#include " llvm/ADT/SmallSet.h"
2121#include " llvm/ADT/SmallString.h"
2222#include " llvm/ADT/StringExtras.h"
23- #include " llvm/ADT/StringMap.h"
2423#include " llvm/ADT/StringRef.h"
2524#include " llvm/ADT/StringSet.h"
2625#include " llvm/ADT/StringSwitch.h"
@@ -114,9 +113,8 @@ class BuiltinNameEmitter {
114113 // \param Output (out) String containing the enums to emit in the output file.
115114 // \param List (out) List containing the extracted Types, except the Types in
116115 // 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);
120118
121119 // Emit the enum or struct used in the generated file.
122120 // Populate the TypeList at the same time.
@@ -364,7 +362,7 @@ void BuiltinNameEmitter::Emit() {
364362}
365363
366364void BuiltinNameEmitter::ExtractEnumTypes (ArrayRef<const Record *> Types,
367- StringMap< bool > &TypesSeen,
365+ StringSet< > &TypesSeen,
368366 std::string &Output,
369367 std::vector<const Record *> &List) {
370368 raw_string_ostream SS (Output);
@@ -376,7 +374,7 @@ void BuiltinNameEmitter::ExtractEnumTypes(ArrayRef<const Record *> Types,
376374 // the Record can be a VectorType or something else, only the name is
377375 // important.
378376 List.push_back (T);
379- TypesSeen.insert (std::make_pair ( T->getValueAsString (" Name" ), true ));
377+ TypesSeen.insert (T->getValueAsString (" Name" ));
380378 }
381379 }
382380}
@@ -385,7 +383,7 @@ void BuiltinNameEmitter::EmitDeclarations() {
385383 // Enum of scalar type names (float, int, ...) and generic type sets.
386384 OS << " enum OpenCLTypeID {\n " ;
387385
388- StringMap< bool > TypesSeen;
386+ StringSet< > TypesSeen;
389387 std::string GenTypeEnums;
390388 std::string TypeEnums;
391389
0 commit comments