[DNM/SILGen] Default argument generator visibility. #33452
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Apple,
Thought I’d raise this PR as a possible change to make default argument generators non-hidden which would help me (in the long term) resolve an issue I’m seeing with “code Injection” for Swift. If a user tries to inject code which contains a call to a function using a default argument, InjectionIII fails as is shown in this issue. This is because while the function is public and accessible the default argument generators are "hidden" and the symbol is not available for dynamic linking which seems inconsistent.
Is there any chance it would be possible these functions be emitted public then this issue would not arise. @slavapestov, I see you made this commit for which I’m sure there are ABI “reasons” but could this be revisited specifically for default argument generators? At present I’m having to suggest users work around by running a program that patches object files to publish these symbols.
Cheers,