[PATCH] D64318: [WebAssembly] Make sret parameter work with AddMissingPrototypes

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 8 04:27:53 PDT 2019


sbc100 accepted this revision.
sbc100 added inline comments.


================
Comment at: lib/Target/WebAssembly/WebAssemblyAddMissingPrototypes.cpp:83
+      for (Argument &A : F.args())
+        if (!A.hasStructRetAttr())
+          report_fatal_error("Functions with 'no-prototype' attribute should "
----------------
aheejin wrote:
> sbc100 wrote:
> > Is there some kind of "any" construct in llvm that could take A.hasStructRetAttr as a predicate?
> It does not seem to be possible to use `hasStructRetAttr` directly as an argument to `llvm:any_of` without some more binding functions, in which case I think it might be overly complicated. So I used a named lambda instead. (Unnamed lambda makes indentation kind of ugly here)
No worries.  I was mostly just curious.  lgtm either way.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D64318





More information about the llvm-commits mailing list