[PATCH] D64318: [WebAssembly] Make sret parameter work with AddMissingPrototypes
Heejin Ahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 8 04:58:38 PDT 2019
aheejin 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 "
----------------
sbc100 wrote:
> 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.
Come to think of it, there can be at most one argument in this case and that should be the `sret` argument. Maybe we don't need a loop or `any_of`.
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