Render TypeContextDescriptor into a proper hierarchy; NFC.

The purpose here is to make it easier to add type-specific fields to the
descriptor.
This commit is contained in:
John McCall
2018-02-20 15:20:32 -05:00
parent fab3c180f9
commit 23fa44e56c
7 changed files with 368 additions and 232 deletions

View File

@@ -32,7 +32,7 @@ intptr_t _swift_stdlib_getDefaultErrorCode(OpaqueValue *error,
// Enum tags use negative values for payload cases, so adjust code to be
// in the range [0, num-cases).
result = T->vw_getEnumTag(error) +
T->getTypeContextDescriptor()->Enum.getNumPayloadCases();
cast<EnumMetadata>(T)->getDescription()->getNumPayloadCases();
break;
case MetadataKind::Class: