Skip to content

[5.6] [stdlib] Some fixes for scalar names #40759

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
Jan 11, 2022

Conversation

Azoy
Copy link
Contributor

@Azoy Azoy commented Jan 7, 2022

This cherry picks the changes made to fix getting some scalar names.
(Note this is dependent on #40758 )

(Cherry pick of #40644 for 5.6)

@Azoy Azoy added the r5.6 label Jan 7, 2022
@Azoy Azoy requested a review from kylemacomber January 7, 2022 04:50
@Azoy
Copy link
Contributor Author

Azoy commented Jan 7, 2022

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented Jan 7, 2022

Build failed
Swift Test OS X Platform
Git Sha - d83366e0c994987b29e473eac76e19d1a85e7233

@Azoy
Copy link
Contributor Author

Azoy commented Jan 7, 2022

@swift-ci please clean test macOS

@Azoy
Copy link
Contributor Author

Azoy commented Jan 10, 2022

@swift-ci please test

@@ -159,6 +159,12 @@ func emitScalarNames(
}
}

result += """
#define NAMES_LAST_SCALAR_OFFSET \(nameBytes.count)
Copy link
Contributor

@stephentyrone stephentyrone Jan 10, 2022

Choose a reason for hiding this comment

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

Normally in C I would define these in terms of the collection:

static const size_t _swift_stdlib_names_last_offset = sizeof _swift_stdlib_names / sizeof _swift_stdlib_names[0];

Given that they're programmatically generated, I'm ok with doing it they way you have it, so no need to fix this right now, but I generally prefer this style.

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 17b6b1e

@Azoy
Copy link
Contributor Author

Azoy commented Jan 10, 2022

@swift-ci please clean test macOS

@Azoy Azoy merged commit 8ae983c into swiftlang:release/5.6 Jan 11, 2022
@Azoy Azoy deleted the 5.6-patch-2 branch January 11, 2022 05:14
@AnthonyLatsis AnthonyLatsis added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.6 labels Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants