mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
AST: Add GenericTypeParamType::getWeight()
This is currently always 0, but can be set to 1.
This commit is contained in:
@@ -7621,12 +7621,13 @@ DESERIALIZE_TYPE(GENERIC_TYPE_PARAM_TYPE)(
|
||||
unsigned rawParamKind;
|
||||
bool hasDecl;
|
||||
unsigned depth;
|
||||
unsigned weight;
|
||||
unsigned index;
|
||||
DeclID declOrIdentifier;
|
||||
TypeID valueTypeID;
|
||||
|
||||
decls_block::GenericTypeParamTypeLayout::readRecord(
|
||||
scratch, rawParamKind, hasDecl, depth, index, declOrIdentifier,
|
||||
scratch, rawParamKind, hasDecl, depth, weight, index, declOrIdentifier,
|
||||
valueTypeID);
|
||||
|
||||
auto paramKind = getActualParamKind(rawParamKind);
|
||||
@@ -7655,10 +7656,11 @@ DESERIALIZE_TYPE(GENERIC_TYPE_PARAM_TYPE)(
|
||||
return valueType.takeError();
|
||||
|
||||
if (declOrIdentifier == 0) {
|
||||
return GenericTypeParamType::get(*paramKind, depth, index, *valueType,
|
||||
return GenericTypeParamType::get(*paramKind, depth, index, weight, *valueType,
|
||||
MF.getContext());
|
||||
}
|
||||
|
||||
ASSERT(weight == 0);
|
||||
auto name = MF.getDeclBaseName(declOrIdentifier).getIdentifier();
|
||||
return GenericTypeParamType::get(name, *paramKind, depth, index, *valueType,
|
||||
MF.getContext());
|
||||
|
||||
Reference in New Issue
Block a user