================
@@ -542,8 +542,15 @@ CIRGenTypes::arrangeCIRFunctionInfo(CanQualType returnType,
void *insertPos = nullptr;
CIRGenFunctionInfo *fi = functionInfos.FindNodeOrInsertPos(id, insertPos);
- if (fi)
+ if (fi) {
+ // We found a matching function info based on id. These asserts verify that
+ // it really is a match.
+ assert(
+ fi->getReturnType() == returnType &&
+ std::equal(fi->argTypesBegin(), fi->argTypesEnd(), argTypes.begin()) &&
+ "Bad match based on CIRGenFunctionInfo folding set id");
----------------
andykaylor wrote:
@bcardosolopes I think this assert accomplishes the testing you asked for in
https://github.com/llvm/llvm-project/pull/140322 thoroughly without the need to
introduce a unit test.
https://github.com/llvm/llvm-project/pull/140612
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits