Closed pengxu-peter closed 1 year ago
Both is valid way to achieve the same thing. Either you pass all variables as implicit args, like it is described currently in this document, or you generate a new struct that packs all variables like it is done in current clang. Passing a single struct pointer instead of many implicit args is probably easier when capturing a lot of variables.
I'll add a note about this.
file "https://github.com/f0rki/mapping-high-level-constructs-to-llvm-ir/blob/master/advanced-constructs/lambda-functions.rst" show:
can pass all implicit as explicit arguments as arguments like:
but when i run using command
the result is implicit arguments using %class.anon*
%class.anon = type { i32 }