mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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:
@@ -223,6 +223,10 @@ class Traversal : public ASTVisitor<Traversal, Expr*, Stmt*,
|
||||
if (doIt(Req.getSubjectLoc()) || doIt(Req.getConstraintLoc()))
|
||||
return true;
|
||||
break;
|
||||
case RequirementReprKind::LayoutConstraint:
|
||||
if (doIt(Req.getFirstTypeLoc()))
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -279,6 +283,10 @@ class Traversal : public ASTVisitor<Traversal, Expr*, Stmt*,
|
||||
if (doIt(Req.getSubjectLoc()) || doIt(Req.getConstraintLoc()))
|
||||
return true;
|
||||
break;
|
||||
case RequirementReprKind::LayoutConstraint:
|
||||
if (doIt(Req.getSubjectLoc()))
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user