Change Projection to support signed indices.

Change ProjectionIndex for ref_tail_addr to std::numeric_limits<int>::max();
This is necessary to disambiguate the tail elements from
ref_element_addr field zero.
This commit is contained in:
Andrew Trick
2020-04-05 18:51:43 -07:00
parent 7774f06f10
commit 2767b51d61
5 changed files with 52 additions and 52 deletions

View File

@@ -843,7 +843,7 @@ bool COWArrayOpt::hoistMakeMutable(ArraySemanticsCall MakeMutable,
return false;
}
SmallVector<unsigned, 4> AccessPath;
SmallVector<int, 4> AccessPath;
SILValue ArrayContainer =
StructUseCollector::getAccessPath(CurrentArrayAddr, AccessPath);
bool arrayContainerIsUnique = checkUniqueArrayContainer(ArrayContainer);