Even with functions with no-prototype attribute, there can be an
argument sret (structure return) attribute, which is an optimization
when a function return type is a struct. Fixes PR42420.
Details
Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 34488 Build 34487: arc lint + arc unit
Event Timeline
lib/Target/WebAssembly/WebAssemblyAddMissingPrototypes.cpp | ||
---|---|---|
83 | Is there some kind of "any" construct in llvm that could take A.hasStructRetAttr as a predicate? |
lib/Target/WebAssembly/WebAssemblyAddMissingPrototypes.cpp | ||
---|---|---|
83 | 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) |
lib/Target/WebAssembly/WebAssemblyAddMissingPrototypes.cpp | ||
---|---|---|
83 | No worries. I was mostly just curious. lgtm either way. |
- sret argument should be the first one
lib/Target/WebAssembly/WebAssemblyAddMissingPrototypes.cpp | ||
---|---|---|
83 | 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. |
Is there some kind of "any" construct in llvm that could take A.hasStructRetAttr as a predicate?