llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) <details> <summary>Changes</summary> --- Full diff: https://github.com/llvm/llvm-project/pull/109372.diff 1 Files Affected: - (modified) clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp (+3-5) ``````````diff diff --git a/clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp b/clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp index 4ce8655f6883e6..25c7bf0306a891 100644 --- a/clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp +++ b/clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp @@ -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"); @@ -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()); `````````` </details> https://github.com/llvm/llvm-project/pull/109372 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits