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
8 changes: 3 additions & 5 deletions clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -896,9 +896,8 @@ static void OCL2Qual(Sema &S, const OpenCLTypeStruct &Ty,
if (ImageTypesMap.contains(T->getValueAsString("Name")))
continue;
// Check we have not seen this Type
if (TypesSeen.contains(T->getValueAsString("Name")))
if (!TypesSeen.try_emplace(T->getValueAsString("Name"), true).second)
continue;
TypesSeen.insert(std::make_pair(T->getValueAsString("Name"), true));

// Check the Type does not have an "abstract" QualType
auto QT = T->getValueAsDef("QTExpr");
Expand Down Expand Up @@ -1081,9 +1080,8 @@ void OpenCLBuiltinFileEmitterBase::expandTypesInSignature(
// the full type name to the extension.
StringRef Ext =
Type->getValueAsDef("Extension")->getValueAsString("ExtName");
if (!Ext.empty() && !TypeExtMap.contains(FullType)) {
TypeExtMap.insert({FullType, Ext});
}
if (!Ext.empty())
TypeExtMap.try_emplace(FullType, Ext);
}
}
NumSignatures = std::max<unsigned>(NumSignatures, ExpandedArg.size());
Expand Down