[PATCH] D60161: Expose non-trivial struct helpers for Swift.

Tony Allevato via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 10 09:10:06 PDT 2019


allevato marked 2 inline comments as done.
allevato added a comment.

Thanks for the review! This is ready to go on my end if there aren't any other comments.



================
Comment at: clang/lib/CodeGen/CGNonTrivialStruct.cpp:845
+  // actually use them (it overwrites them with the addresses of the arguments
+  // of the created function).
+  return Gen.getFunction(FuncName, QT, createNullAddressArray<N>(), Alignments,
----------------
ahatanak wrote:
> I think `getFunction` shouldn't require passing addresses, but that's not this patch's fault. I'll see if I can remove the parameter. 
Yeah, this hack bummed me out and I tried cleaning up the other related functions to have them not reuse the array in this way, but the way std::array and the template arg size_t N are currently being used throughout made those attempts ripple through in ways that would have required a deeper refactor.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D60161





More information about the cfe-commits mailing list