[PATCH] D80166: [CGCall] Annotate reference parameters with "align" attribute.

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 19 15:28:00 PDT 2020


rjmccall accepted this revision.
rjmccall added a comment.
This revision is now accepted and ready to land.

LGTM.



================
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());
       }
----------------
efriedma wrote:
> 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.
Ah... true, and even if they were, it would presumably be a complete object that was returned.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80166/new/

https://reviews.llvm.org/D80166





More information about the cfe-commits mailing list