Skip to content

[ClangImporter] Fix handling of bitfields in unions #14412

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

jrose-apple
Copy link
Contributor

@jrose-apple jrose-apple commented Feb 5, 2018

Previously this caused an assertion failure in +Asserts builds and incorrect behavior in -Asserts builds.

rdar://problem/37242238

@jrose-apple jrose-apple requested a review from jckarter February 5, 2018 20:00
@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

swift-ci commented Feb 5, 2018

Build failed
Swift Test Linux Platform
Git Sha - ed372b61c1a6ddbab87251bdc04eb370d3cd13e9

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.

Looks good, thanks Jordan!

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test Linux

@swift-ci
Copy link
Contributor

swift-ci commented Feb 5, 2018

Build failed
Swift Test Linux Platform
Git Sha - ed372b61c1a6ddbab87251bdc04eb370d3cd13e9

@jrose-apple
Copy link
Contributor Author

jrose-apple commented Feb 5, 2018

<unknown>:0: error: module 'SwiftGlibc' in AST file '/tmp/swift-testsuite-clang-module-cachekQ1VqF/3HI2C9E08ID58/SwiftGlibc-21G5CLUE7WUPX.pcm' (imported by AST file '/tmp/lit_tmp_5JlkA_/unions-and-bitfields-d6cac5.pch') is not defined in any loaded module map file; maybe you need to load '/home/buildnode/jenkins/workspace/swift-PR-Linux/branch-master/buildbot_linux/swift-linux-x86_64/lib/swift/linux/x86_64/glibc.modulemap'?
<unknown>:0: note: consider adding '/home/buildnode/jenkins/workspace/swift-PR-Linux/branch-master/buildbot_linux/swift-linux-x86_64/lib/swift/linux/x86_64' to the header search path
<unknown>:0: note: imported by '/tmp/lit_tmp_5JlkA_/unions-and-bitfields-d6cac5.pch'
<unknown>:0: error: clang importer creation failed

(here)

Okay, this doesn't seem possible. The Clang importer unconditionally loads that module map.

@swift-ci Please test Linux

@swift-ci
Copy link
Contributor

swift-ci commented Feb 5, 2018

Build failed
Swift Test Linux Platform
Git Sha - ed372b61c1a6ddbab87251bdc04eb370d3cd13e9

@jrose-apple
Copy link
Contributor Author

At least it reproduces reliably. Looking into it.

@jrose-apple jrose-apple force-pushed the bitfields-unions-porque-no-los-dos branch from ed372b6 to e435e93 Compare February 6, 2018 00:41
@jrose-apple
Copy link
Contributor Author

jrose-apple commented Feb 6, 2018

Filed LLVM PR36245. Full Mac tests passed, so

@swift-ci Please test Linux

@jrose-apple
Copy link
Contributor Author

@swift-ci Please smoke test macOS

@swift-ci
Copy link
Contributor

swift-ci commented Feb 6, 2018

Build failed
Swift Test Linux Platform
Git Sha - ed372b61c1a6ddbab87251bdc04eb370d3cd13e9

@jrose-apple jrose-apple merged commit c06cc01 into swiftlang:master Feb 6, 2018
@jrose-apple jrose-apple deleted the bitfields-unions-porque-no-los-dos branch February 6, 2018 02:13
jrose-apple added a commit to jrose-apple/swift that referenced this pull request Feb 6, 2018
Previously this caused an assertion failure in +Asserts builds
and incorrect behavior in -Asserts builds.

rdar://problem/37242238
(cherry picked from commit c06cc01)
jrose-apple added a commit to jrose-apple/swift that referenced this pull request Feb 6, 2018
Previously this caused an assertion failure in +Asserts builds
and incorrect behavior in -Asserts builds.

rdar://problem/37242238
(cherry picked from commit c06cc01)
jrose-apple added a commit that referenced this pull request Feb 8, 2018
Previously this caused an assertion failure in +Asserts builds
and incorrect behavior in -Asserts builds.

rdar://problem/37242238
(cherry picked from commit c06cc01)
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