Pass the indices for writeback-conflict diagnostics on coroutines.

To do this, I had to introduce a way to unsafely copy an argument
list for the purposes of diagnostics.

rdar:://43802132
This commit is contained in:
John McCall
2018-08-31 04:18:20 -04:00
parent 123d27d4a8
commit dd77a2037e
6 changed files with 85 additions and 9 deletions

View File

@@ -813,3 +813,13 @@ SILType RValue::getLoweredImplodedTupleType(SILGenFunction &SGF) const & {
return loweredType.getAddressType();
return loweredType.getObjectType();
}
RValue RValue::copyForDiagnostics() const {
assert(!isInSpecialState());
assert(isComplete());
RValue result(type);
for (auto value : values)
result.values.push_back(value);
result.elementsToBeAdded = 0;
return result;
}