================
@@ -138,7 +139,7 @@ isSafeToConvert(const RecordDecl *rd, CIRGenTypes &cgt,
   if (!alreadyChecked.insert(rd).second)
     return true;
 
-  const Type *key = cgt.getASTContext().getTagDeclType(rd).getTypePtr();
+  const Type *key = cgt.getASTContext().getCanonicalTagType(rd).getTypePtr();
----------------
mizvekov wrote:

FYI slightly unrelated, but it might make sense to 
`assert(rd->isCompleteDefinition()` since some of the uses here only make sense 
when applied on the definition, such as the `fields` iteration down below.

https://github.com/llvm/llvm-project/pull/152846
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to