mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Eliminate default argument expressions from the type system.
Elements of a tuple type now know if there is a default argument, and what kind of default argument it is (callee side, __FILE__, __LINE__, __COLUMN__), but they don't have an actual expression. There are a number of cleanups this enables that will follow. Note that the serialization support is as-yet-untested. Swift SVN r6351
This commit is contained in:
@@ -1480,14 +1480,18 @@ Type ModuleFile::getType(TypeID TID) {
|
||||
|
||||
IdentifierID nameID;
|
||||
TypeID typeID;
|
||||
uint8_t rawDefArg;
|
||||
bool isVararg;
|
||||
decls_block::TupleTypeEltLayout::readRecord(scratch, nameID, typeID,
|
||||
isVararg);
|
||||
rawDefArg, isVararg);
|
||||
|
||||
{
|
||||
BCOffsetRAII restoreOffset(DeclTypeCursor);
|
||||
elements.push_back({getType(typeID), getIdentifier(nameID),
|
||||
/*initializer=*/nullptr, isVararg});
|
||||
DefaultArgumentKind defArg = DefaultArgumentKind::None;
|
||||
if (auto actualDefArg = getActualDefaultArgKind(rawDefArg))
|
||||
defArg = *actualDefArg;
|
||||
elements.push_back({getType(typeID), getIdentifier(nameID), defArg,
|
||||
isVararg});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user