Commits

Devin Coughlin committed 3749a98763d
Record the reason a declaration is potentially unavailable. This commit adds tracking of the reason a declaration reference is potentially unavailable to the UnavailableToOptionalExpr AST node and to OverloadChoice. We will use this reason during SILGen to emit the appropriate run-time check and during typechecking to provide more helpful diagnostics. To keep OverloadChoice as small as possible, we encode the reason as an index into a vector of reasons stored in a given instance of ConstraintSystem (this is the same approach that Fix takes). This commit adds Sema/OverloadChoice.cpp (for the parts of OverloadChoice that now rely on ConstraintSystem) and AST/Availability.h (to bring in availability-related structures without TypeRefinementContext). Swift SVN r22377