Sema: Build the AST for inout address conversions.

Add two new AST node types:

- InOutConversionExpr, which represents an '&x' expression that involves inout conversion. This will be a signal to SILGen not to introduce a writeback scope for the nested conversion call.

- LValueToPointerExpr, which represents the primitive '@lvalue T' to 'RawPointer' conversion that produces the argument to the inout conversion.

Build an InOutConversionExpr AST when an inout expression is resolved by a conversion to an BuiltinInOutAddressConvertible type.

Swift SVN r15594
This commit is contained in:
Joe Groff
2014-03-29 02:50:25 +00:00
parent 93f319c706
commit 46f77c6181
11 changed files with 189 additions and 24 deletions

View File

@@ -1191,6 +1191,9 @@ namespace {
Type visitOpenExistentialExpr(OpenExistentialExpr *expr) {
llvm_unreachable("Already type-checked");
}
Type visitInOutConversionExpr(InOutConversionExpr *expr) {
llvm_unreachable("Already type-checked");
}
};
/// \brief AST walker that "sanitizes" an expression for the