Merge remote-tracking branch 'origin/master' into master-next

This commit is contained in:
Bob Wilson
2017-01-12 15:58:19 -08:00
297 changed files with 4847 additions and 1684 deletions

View File

@@ -968,6 +968,7 @@ static uint8_t getRawStableRequirementKind(RequirementKind kind) {
CASE(Conformance)
CASE(Superclass)
CASE(SameType)
CASE(Layout)
}
#undef CASE
@@ -983,11 +984,14 @@ void Serializer::writeGenericRequirements(ArrayRef<Requirement> requirements,
auto reqAbbrCode = abbrCodes[GenericRequirementLayout::Code];
for (const auto &req : requirements) {
GenericRequirementLayout::emitRecord(
Out, ScratchRecord, reqAbbrCode,
getRawStableRequirementKind(req.getKind()),
addTypeRef(req.getFirstType()),
addTypeRef(req.getSecondType()));
if (req.getKind() != RequirementKind::Layout)
GenericRequirementLayout::emitRecord(
Out, ScratchRecord, reqAbbrCode,
getRawStableRequirementKind(req.getKind()),
addTypeRef(req.getFirstType()), addTypeRef(req.getSecondType()));
else {
// TODO: write layout requirement here.
}
}
}
@@ -2903,7 +2907,6 @@ static uint8_t getRawStableParameterConvention(swift::ParameterConvention pc) {
SIMPLE_CASE(ParameterConvention, Direct_Owned)
SIMPLE_CASE(ParameterConvention, Direct_Unowned)
SIMPLE_CASE(ParameterConvention, Direct_Guaranteed)
SIMPLE_CASE(ParameterConvention, Direct_Deallocating)
}
llvm_unreachable("bad parameter convention kind");
}