Skip to content

Shims: include math.h on Windows #23791

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
Apr 4, 2019

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented Apr 4, 2019

Since we use _hypotf on Windows rather than __builtin_hyptof due to
a bug in LLVM with the TLI lowering to the wrong builtin, include the
math header to get the proper declaration.

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 Apr 4, 2019

@swift-ci please smoke test and merge

@stephentyrone stephentyrone self-requested a review April 4, 2019 16:18
Copy link
Contributor

@stephentyrone stephentyrone left a comment

Choose a reason for hiding this comment

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

There shouldn't be any host C library headers included in the swift shims header; you'll need to put just the declaration you need inline (see, e.g. free( ) on L64).

Since we use `_hypotf` on Windows rather than `__builtin_hyptof` due to
a bug in LLVM with the TLI lowering to the wrong builtin, include the
math header to get the proper declaration.
@compnerd compnerd force-pushed the you-know-nothing-clang branch from 2a6f698 to c697ddd Compare April 4, 2019 16:30
@compnerd compnerd requested a review from stephentyrone April 4, 2019 16:30
@compnerd
Copy link
Member Author

compnerd commented Apr 4, 2019

@swift-ci please smoke test and merge

@swift-ci swift-ci merged commit 5150981 into swiftlang:master Apr 4, 2019
@compnerd compnerd deleted the you-know-nothing-clang branch April 4, 2019 19:20
stephentyrone added a commit to stephentyrone/swift that referenced this pull request Apr 4, 2019
…hing-clang"

This reverts commit 5150981, reversing
changes made to 8fc305c.
stephentyrone added a commit that referenced this pull request Apr 4, 2019
* Revert "Merge pull request #23791 from compnerd/you-know-nothing-clang"

This reverts commit 5150981, reversing
changes made to 8fc305c.

* Revert "Merge pull request #23780 from compnerd/math-is-terrible"

This reverts commit 2d7fedd, reversing
changes made to 0205150.

* Revert "Merge pull request #23140 from stephentyrone/mafs"

This reverts commit 777750d, reversing
changes made to 0c8920e.
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.

3 participants