Skip to content

Fixes for #dsohandle default arguments [4.0] #10349

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

Merged

Conversation

slavapestov
Copy link
Contributor

@slavapestov slavapestov commented Jun 17, 2017

  • Description: A user reported assertion failures while trying to define a default argument with a value of #dsohandle for an @inline(__always) function. While the latter is not a documented feature, we shouldn't crash.

  • Scope of the issue: Affects a narrow set of use-cases but it's a simple fix I think.

  • Risk: Low

  • Tested: New tests added

  • Reviewed by: @jckarter

  • Radar: rdar://problem/32597278

…ters

Some default parameter expressions like #file, #line, #function etc
are emitted into the caller directly by SILGen, instead of being
emitted as a call to a generator function.

In these cases, we don't need to emit the generator function at all.
…n_external

This allows it to be referenced from inlinable functions.

Fixes <rdar://problem/32597278>.
@slavapestov
Copy link
Contributor Author

@jckarter Here is the second version that fixes the issue more comprehensively -- can you take a look?

@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@slavapestov slavapestov changed the title Fixes for #dsohandle default arguments Fixes for #dsohandle default arguments [4.0] Jun 17, 2017
@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - fef958d
Test requested by - @slavapestov

@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@najacque
Copy link
Contributor

@swift-ci please clean test

Copy link
Contributor

@jckarter jckarter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. This should be the right linkage as far as ld is concerned.

@ematejska ematejska merged commit 3e91330 into swiftlang:swift-4.0-branch Jun 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants