Skip to content

[rebranch] Get Swift almost building with stable/20250601 #82243

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 14 commits into from
Jun 17, 2025

Conversation

AnthonyLatsis
Copy link
Collaborator

No description provided.

Comment on lines 4210 to 4223
// FIXME: Should we also do
// https://github.com/swiftlang/llvm-project/pull/10723?
llvm::PrefixMapper Mapper;
clang::tooling::dependencies::DepscanPrefixMapping::configurePrefixMapper(
Impl.SwiftContext.SearchPathOpts.ScannerPrefixMapper, Mapper);
SmallVector<llvm::MappedPrefix> Prefixes;
if (auto E = llvm::MappedPrefix::transformJoined(
Impl.SwiftContext.SearchPathOpts.ScannerPrefixMapper, Prefixes)) {
// Save this string. In general the diagnostic might outlive this
// function.
auto identifier =
Impl.SwiftContext.getIdentifier(llvm::toString(std::move(E)));
Impl.SwiftContext.Diags.diagnose(SourceLoc(), diag::error_prefix_mapping,
identifier.str());
}
Mapper.addRange(Prefixes);
Mapper.sort();

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is probably the only change that I feel needs a review. @Xazax-hun Could you take a look?

See swiftlang/llvm-project#10723.

Copy link
Contributor

Choose a reason for hiding this comment

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

Took a look, apart from a nit looks good to me. But just to double check, is this helper function that we used to use gone without any replacement? Although now at least we have a diagnostic for the failure case, which is great.

Copy link
Collaborator Author

@AnthonyLatsis AnthonyLatsis Jun 16, 2025

Choose a reason for hiding this comment

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

Yeah, it was refactored to accept an array of pairs. The splitting for compatibility with the old option is now done inline in the driver.

@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please smoke test macOS

Comment on lines 4210 to 4223
// FIXME: Should we also do
// https://github.com/swiftlang/llvm-project/pull/10723?
llvm::PrefixMapper Mapper;
clang::tooling::dependencies::DepscanPrefixMapping::configurePrefixMapper(
Impl.SwiftContext.SearchPathOpts.ScannerPrefixMapper, Mapper);
SmallVector<llvm::MappedPrefix> Prefixes;
if (auto E = llvm::MappedPrefix::transformJoined(
Impl.SwiftContext.SearchPathOpts.ScannerPrefixMapper, Prefixes)) {
// Save this string. In general the diagnostic might outlive this
// function.
auto identifier =
Impl.SwiftContext.getIdentifier(llvm::toString(std::move(E)));
Impl.SwiftContext.Diags.diagnose(SourceLoc(), diag::error_prefix_mapping,
identifier.str());
}
Mapper.addRange(Prefixes);
Mapper.sort();

Copy link
Contributor

Choose a reason for hiding this comment

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

Took a look, apart from a nit looks good to me. But just to double check, is this helper function that we used to use gone without any replacement? Although now at least we have a diagnostic for the failure case, which is great.

Comment on lines 4210 to 4211
// FIXME: Should we also do
// https://github.com/swiftlang/llvm-project/pull/10723?
Copy link
Contributor

@bnbarham bnbarham Jun 17, 2025

Choose a reason for hiding this comment

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

Can we find this out rather than add a fixme? Or add an issue and point to that instead. Otherwise this will just sit here forever more 😅 CC @benlangmuir

@AnthonyLatsis AnthonyLatsis merged commit 5e22a5b into swiftlang:rebranch Jun 17, 2025
@AnthonyLatsis AnthonyLatsis deleted the rebranch branch June 17, 2025 11:20
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