Don't build temporary variables of InOutType.

This only appears in the print logging for now.
I've got to figure out a way of transforming
print() calls without building temporary variables
left and right.

<rdar://problem/21412489>


Swift SVN r29683
This commit is contained in:
Sean Callanan
2015-06-25 20:01:24 +00:00
parent 1d2374e5ba
commit 814a2d6623

View File

@@ -541,7 +541,8 @@ public:
appendNewline = TE->getElement(1);
}
}
if (object && appendNewline) {
if (object && !object->getType()->is<InOutType>() &&
appendNewline && !appendNewline->getType()->is<InOutType>()) {
std::pair<PatternBindingDecl *, VarDecl *> objectPV =
buildPatternAndVariable(object);
std::pair<PatternBindingDecl *, VarDecl *> appendNewlinePV =