Skip to content

Conversation

@cachemeifyoucan
Copy link
Contributor

Bring back legacy prefix map option to allow an older swift-driver to work with newer swift-frontend. For old swift-driver, it will always send the old style prefix map option, so the new compiler needs to support that.

rdar://164208526

@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke test

if (auto Mapping = llvm::MappedPrefix::getFromJoined(Opt)) {
Opts.ScannerPrefixMapper.push_back({Mapping->Old, Mapping->New});
} else {
Diags.diagnose(SourceLoc(), diag::error_prefix_mapping, Opt);
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI i just deleted this diagnostic id in #85282 since it seemed to be unused, so that might cause some build failures

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see. I forgot to pull and I was wondering why the old diag was there when I bring back the logic.

Bring back legacy prefix map option to allow an older swift-driver to
work with newer swift-frontend. For old swift-driver, it will always
send the old style prefix map option, so the new compiler needs to
support that.

rdar://164208526
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke test

@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please clean smoke test

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