Skip to content

Fixes an invalid assert in No Payload Enum's collectArchetypeMetadata: the type itself might contain an Archetype. We need to check that it is not an Archetype itself #13257

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
Dec 5, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/IRGen/GenEnum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ namespace {
llvm::MapVector<CanType, llvm::Value *> &typeToMetadataVec,
SILType T) const override {
auto canType = T.getSwiftRValueType();
assert(!canType->hasArchetype() &&
assert(!canType->is<ArchetypeType>() &&
"collectArchetypeMetadata: no archetype expected here");
}

Expand Down
3 changes: 1 addition & 2 deletions lib/IRGen/GenValueWitness.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1397,6 +1397,5 @@ void TypeInfo::collectArchetypeMetadata(
llvm::MapVector<CanType, llvm::Value *> &typeToMetadataVec,
SILType T) const {
auto canType = T.getSwiftRValueType();
assert(!canType->getWithoutSpecifierType()->is<ArchetypeType>() &&
"Did not expect an ArchetypeType");
assert(!canType->is<ArchetypeType>() && "Did not expect an ArchetypeType");
}