Skip to content
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

[overlay] Make an overlay for the clang _Builtin_float module #71474

Merged

Conversation

ian-twilightcoder
Copy link
Contributor

Clang's builtin float.h is no longer included in OS/SDK modules, and so it needs its own overlay.

rdar://122351557

@ian-twilightcoder ian-twilightcoder requested a review from a team as a code owner February 8, 2024 18:52
@ian-twilightcoder
Copy link
Contributor Author

/Users/ec2-user/jenkins/workspace/swift-PR-macos-smoke-test/branch-main/swift/test/stdlib/FloatConstants.swift:21:5: error: unexpected error produced: ambiguous use of 'FLT_RADIX'
_ = FLT_RADIX // expected-warning {{is deprecated}}
    ^

Hmm, we need some way to figure out if _Builtin_Float actually declares anything...

@ian-twilightcoder
Copy link
Contributor Author

/Users/ec2-user/jenkins/workspace/swift-PR-macos-smoke-test/branch-main/swift/test/stdlib/FloatConstants.swift:21:5: error: unexpected error produced: ambiguous use of 'FLT_RADIX'
_ = FLT_RADIX // expected-warning {{is deprecated}}
    ^

Hmm, we need some way to figure out if _Builtin_Float actually declares anything...

No wait, this is a problem with the test. _Builtin_Float should never be directly imported, it will come in via one of the other modules if -fbuiltin-headers-in-system-modules is not used.

@ian-twilightcoder
Copy link
Contributor Author

Hmm, does this one make sense to anyone?

C:/Users/swift-ci/jenkins/workspace/swift-PR-windows/swift/stdlib/public/ClangOverlays/float.swift.gyb:25:36: error: type 'Float80' has no member 'significandBitCount'

@ian-twilightcoder
Copy link
Contributor Author

Hmm, does this one make sense to anyone?

C:/Users/swift-ci/jenkins/workspace/swift-PR-windows/swift/stdlib/public/ClangOverlays/float.swift.gyb:25:36: error: type 'Float80' has no member 'significandBitCount'

Ah, the different overlays did different things with Float80, they just need to be conditionalized by os.

@ian-twilightcoder ian-twilightcoder force-pushed the builtin-float-overlay branch 4 times, most recently from 9ab4a14 to 083d34d Compare February 15, 2024 08:37
Clang's builtin float.h is no longer included in OS/SDK modules, and so it needs its own overlay.

rdar://122351557
@ian-twilightcoder
Copy link
Contributor Author

@swift-ci smoke test

@ian-twilightcoder
Copy link
Contributor Author

@swift-ci test

@ian-twilightcoder ian-twilightcoder merged commit 5acd961 into swiftlang:main Feb 22, 2024
5 checks passed
@ian-twilightcoder ian-twilightcoder deleted the builtin-float-overlay branch February 22, 2024 20:26
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.

2 participants