efriedma marked 2 inline comments as done. efriedma added inline comments.
================ Comment at: clang/lib/CodeGen/CGCall.cpp:2116 + if (PTy->isObjectType()) { + if (unsigned Alignment = getContext().getTypeAlignIfKnown(PTy)) + RetAttrs.addAlignmentAttr( ---------------- rjmccall wrote: > This doesn't do the right thing for classes with virtual bases. There's a > `getNaturalTypeAlignment` function you should be able to use, although you > might have to pull it to CGM. Good point; I'll fix it. ================ Comment at: clang/lib/CodeGen/CGCall.cpp:2258 Attrs.addDereferenceableAttr(info.first.getQuantity()); - Attrs.addAttribute(llvm::Attribute::getWithAlignment( - getLLVMContext(), info.second.getAsAlign())); + Attrs.addAlignmentAttr(info.second.getAsAlign()); } ---------------- rjmccall wrote: > Both of these are wrong for classes with virtual bases. I'm pretty sure classes with virtual bases aren't used with SwiftIndirectResult, so not really relevant. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80166/new/ https://reviews.llvm.org/D80166 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits