Add support for layout requirements with layout constraints.

This commit introduces new kind of requirements: layout requirements.

This kind of requirements allows to expose that a type should satisfy certain layout properties, e.g. it should be a trivial type, have a given size and alignment, etc.
This commit is contained in:
Roman Levenstein
2017-01-11 12:45:51 -08:00
parent 94e6a34b32
commit 29180ca1a0
28 changed files with 520 additions and 90 deletions

View File

@@ -962,6 +962,12 @@ void ConstraintSystem::openGeneric(
break;
}
case RequirementKind::Layout: {
// Do not process layout constraints yet, until we allow their use
// outside of @_specialize attribute.
break;
}
case RequirementKind::Superclass: {
auto subjectTy = req.getFirstType().transform(replaceDependentTypes);
auto boundTy = req.getSecondType().transform(replaceDependentTypes);