-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parameter attributes on Cfunction closures sticks #41827
Parameter attributes on Cfunction closures sticks #41827
Conversation
cae5325
to
4cd54af
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like this will work. Seems inefficient, but valid.
Welcome, and thanks! Great to have this fixed. |
4cd54af
to
983d71c
Compare
Thanks! I did a check of the LLVM code of AttributeList and discovered I made a miss in the number of AttributeSets preceding the parameter attributes. I had mistakenly believed that only return value (Index 0) precedes parameters, but apparently function attributes do too (they are at index UNSIGNED_INT_MAX, just preceding 0). I have done a new push with the correct code, keeping both function attributes and return value attributes in their proper place. |
983d71c
to
71d2916
Compare
70b600b
to
2ef9b36
Compare
When CFunction closures are created an extra argument is added to the function signature for holding the closure. Make sure that the parameter attributes on already existing parameters are not shifted when adding that parameter.
2ef9b36
to
d837255
Compare
d837255
to
4adce69
Compare
0d6ed7f
to
6c6c948
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still LGTM to merge (and now more efficient!)
Looks like this constructor requires dropping !hasAttributes ones (or use the get constructor with separate Fn, Ret, and Params attributes, which permits empty attributes) |
6c6c948
to
6cb4806
Compare
6cb4806
to
ffb0e29
Compare
When CFunction closures are created an extra argument is added to the function signature for holding the closure. Make sure that the parameter attributes on already existing parameters are not shifted when adding that parameter. (cherry picked from commit 08f3422)
When CFunction closures are created an extra argument is added to the function signature for holding the closure. Make sure that the parameter attributes on already existing parameters are not shifted when adding that parameter. (cherry picked from commit 08f3422)
When CFunction closures are created an extra argument is added to the function signature for holding the closure. Make sure that the parameter attributes on already existing parameters are not shifted when adding that parameter. (cherry picked from commit 08f3422)
When CFunction closures are created an extra argument is added to the function signature for holding the closure. Make sure that the parameter attributes on already existing parameters are not shifted when adding that parameter. (cherry picked from commit 08f3422)
…#41827) When CFunction closures are created an extra argument is added to the function signature for holding the closure. Make sure that the parameter attributes on already existing parameters are not shifted when adding that parameter.
…#41827) When CFunction closures are created an extra argument is added to the function signature for holding the closure. Make sure that the parameter attributes on already existing parameters are not shifted when adding that parameter.
When CFunction closures are created an extra argument is added to the function signature for holding the closure. Make sure that the parameter attributes on already existing parameters are not shifted when adding that parameter. (cherry picked from commit 08f3422)
When CFunction closures are created an extra parameter is added to the
function signature for holding the closure.
Make sure that the parameter attributes on already existing parameters
are not shifted when adding that parameter.
Fixes #40164