Skip to content

AST: remove dump for GSB #27494

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
merged 1 commit into from
Oct 3, 2019
Merged

AST: remove dump for GSB #27494

merged 1 commit into from
Oct 3, 2019

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented Oct 2, 2019

This relied on UB as per [meta.rqmts]p4
(http://eel.is/c++draft/meta#rqmts-4) and has been UB since C++11
20.9.2p1 has the same restriction.

MSVC 19.24 became more stringent and silently ignores this now,
preventing the Swift build. Require the user to explicitly pass in
-DSWIFT_PERMIT_UNDEFINED_BEHAVIOR to get the dump functionality.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

@compnerd
Copy link
Member Author

compnerd commented Oct 2, 2019

CC: @DougGregor

@compnerd
Copy link
Member Author

compnerd commented Oct 2, 2019

@swift-ci please test

@slavapestov
Copy link
Contributor

Since dump() is only meant to be called from a debugger, can you leave it in? Or fix the UB?

@compnerd
Copy link
Member Author

compnerd commented Oct 2, 2019

@slavapestov, I did leave it in, just behind the macro since it will not even build. The UB is the entire graph writing support, that needs to be completely rewritten I think. The template specialization of std::is_pointer is not permitted by C++ ([meta.rqmts]p4).

This relied on UB as per [meta.rqmts]p4
(http://eel.is/c++draft/meta#rqmts-4) and has been UB since C++11
20.9.2p1 has the same restriction.

MSVC 19.24 became more stringent and silently ignores this now,
preventing the Swift build.  Require the user to explicitly pass in
`-DSWIFT_PERMIT_UNDEFINED_BEHAVIOR` to get the dump functionality.
@compnerd
Copy link
Member Author

compnerd commented Oct 2, 2019

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented Oct 2, 2019

Build failed
Swift Test Linux Platform
Git Sha - b3e699c33363d0cf828c974fd0bf2cc59d125f11

@swift-ci
Copy link
Contributor

swift-ci commented Oct 2, 2019

Build failed
Swift Test OS X Platform
Git Sha - b3e699c33363d0cf828c974fd0bf2cc59d125f11

@compnerd compnerd merged commit 2f3ec72 into swiftlang:master Oct 3, 2019
@compnerd compnerd deleted the dump-gsb branch October 3, 2019 15:27
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.

4 participants