Introduce "inherited" default arguments and use them for inherited initializers.

Previously, we were cloning the default arguments completely, which
meant code duplication (when inheriting within a module) or simply a
failure (when inheriting across modules). Now, we reference the
default arguments where we inherited them, eliminating the
duplication. Part of <rdar://problem/16318855>.

Swift SVN r15062
This commit is contained in:
Doug Gregor
2014-03-14 18:31:22 +00:00
parent 8cf018a1d2
commit d32f668fb2
10 changed files with 106 additions and 12 deletions

View File

@@ -471,6 +471,8 @@ static uint8_t getRawStableDefaultArgumentKind(swift::DefaultArgumentKind kind)
return serialization::DefaultArgumentKind::None;
case swift::DefaultArgumentKind::Normal:
return serialization::DefaultArgumentKind::Normal;
case swift::DefaultArgumentKind::Inherited:
return serialization::DefaultArgumentKind::Inherited;
case swift::DefaultArgumentKind::Column:
return serialization::DefaultArgumentKind::Column;
case swift::DefaultArgumentKind::File: