luken-google added inline comments.
================ Comment at: clang/lib/CodeGen/CGCall.cpp:1338 + llvm::StructType *STy = dyn_cast<llvm::StructType>(Val->getType()); + if (STy && STy->isLayoutIdentical(cast<llvm::StructType>(Dest.getElementType()))) { for (unsigned i = 0, e = STy->getNumElements(); i != e; ++i) { ---------------- ilya-biryukov wrote: > Is it guaranteed that `Dest.getElementType()` is never something other than > `StructType`? Yikes, no. And checking the cast as another condition broke a bunch of other cases. This works much better. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141690/new/ https://reviews.llvm.org/D141690 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits