Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
Expand Down Expand Up @@ -889,14 +890,14 @@ static void OCL2Qual(Sema &S, const OpenCLTypeStruct &Ty,
// Only insert the plain scalar type; vector information and type qualifiers
// are added in step 2.
ArrayRef<const Record *> Types = Records.getAllDerivedDefinitions("Type");
StringMap<bool> TypesSeen;
StringSet<> TypesSeen;

for (const auto *T : Types) {
// Check this is not an image type
if (ImageTypesMap.contains(T->getValueAsString("Name")))
continue;
// Check we have not seen this Type
if (!TypesSeen.try_emplace(T->getValueAsString("Name"), true).second)
if (!TypesSeen.insert(T->getValueAsString("Name")).second)
continue;

// Check the Type does not have an "abstract" QualType
Expand Down
Loading