We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f8b93c commit edcaeccCopy full SHA for edcaecc
lib/SIL/Utils/OwnershipUtils.cpp
@@ -1110,11 +1110,12 @@ bool BorrowedValue::visitInteriorPointerOperandHelper(
1110
continue;
1111
}
1112
1113
- // Look through object.
+ // Look through object. SingleValueInstruction is overly restrictive but
1114
+ // rules out any interesting corner cases.
1115
if (auto *svi = dyn_cast<SingleValueInstruction>(user)) {
- if (Projection::isObjectProjection(svi)) {
1116
- for (SILValue result : user->getResults()) {
1117
- llvm::copy(result->getUses(), std::back_inserter(worklist));
+ if (ForwardingInstruction::isa(user)) {
+ for (auto *use : svi->getUses()) {
1118
+ worklist.push_back(use);
1119
1120
1121
0 commit comments