mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SIL: remove multiple result values from SILValue
As there are no instructions left which produce multiple result values, this is a NFC regarding the generated SIL and generated code. Although this commit is large, most changes are straightforward adoptions to the changes in the ValueBase and SILValue classes.
This commit is contained in:
@@ -179,9 +179,7 @@ void static
|
||||
removeInstructions(ArrayRef<SILInstruction*> UsersToRemove) {
|
||||
for (auto *I : UsersToRemove) {
|
||||
if (!I->use_empty())
|
||||
for (unsigned i = 0, e = I->getNumTypes(); i != e; ++i)
|
||||
SILValue(I, i).replaceAllUsesWith(SILUndef::get(I->getType(i),
|
||||
I->getModule()));
|
||||
I->replaceAllUsesWith(SILUndef::get(I->getType(), I->getModule()));
|
||||
// Now we know that I should not have any uses... erase it from its parent.
|
||||
I->eraseFromParent();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user