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:
Doug Gregor
2013-07-18 18:49:32 +00:00
parent 457f27ccac
commit ad1a9ac2c3
13 changed files with 133 additions and 73 deletions

View File

@@ -1297,10 +1297,12 @@ bool Serializer::writeType(Type ty) {
abbrCode = DeclTypeAbbrCodes[TupleTypeEltLayout::Code];
for (auto &elt : tupleTy->getFields()) {
// FIXME: Handle initializers.
uint8_t rawDefaultArg
= getRawStableDefaultArgumentKind(elt.getDefaultArgKind());
TupleTypeEltLayout::emitRecord(Out, ScratchRecord, abbrCode,
addIdentifierRef(elt.getName()),
addTypeRef(elt.getType()),
rawDefaultArg,
elt.isVararg());
}