Skip to content

[NFC] Fix Projection print for Enum kind #32328

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
Jun 12, 2020

Conversation

meg-gupta
Copy link
Contributor

ProjectionKind::Enum was handled incorrectly causing RLE's debug print to crash

@meg-gupta
Copy link
Contributor Author

@swift-ci smoke test

@@ -549,13 +549,21 @@ ProjectionPath::removePrefix(const ProjectionPath &Path,
}

void Projection::print(raw_ostream &os, SILType baseType) const {
if (isNominalKind()) {
if (getKind() == ProjectionKind::Struct ||
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you make this an exhaustive switch?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@gottesmm
Copy link
Contributor

Other than that LGTM! I am assuming that the RLE dumper issue is exposed by further work in other PRs? Which PR specifically? Or can you link it to this one by mentioning this PR there?

@meg-gupta
Copy link
Contributor Author

@gottesmm This came up while working on some regressions with semantic inlining. Don't have a PR to link yet.

@meg-gupta
Copy link
Contributor Author

@swift-ci smoke test

@meg-gupta
Copy link
Contributor Author

@swift-ci smoke test OSX

1 similar comment
@meg-gupta
Copy link
Contributor Author

@swift-ci smoke test OSX

@meg-gupta
Copy link
Contributor Author

@swift-ci Please smoke test OS X platform

@meg-gupta meg-gupta merged commit 5f40bf2 into swiftlang:master Jun 12, 2020
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