[PATCH] D64318: Make sret parameter work with AddMissingPrototypes

Heejin Ahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 8 03:47:00 PDT 2019


aheejin marked an inline comment as done.
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:
> 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)


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