[sil] Element shadowing of SILInstruction::getKind() by renaming MarkUninitializedInst::get{,MarkUninitialized}Kind().

Interestingly this problem can only occur if one invokes
MarkUninitializedInst::getKind() directly. Once our instruction is just a
SILInstruction, we call the appropriate method so we didn't notice it.

I used Xcode's refactoring functionality to find all of the invocation
locations.
This commit is contained in:
Michael Gottesman
2020-11-17 17:53:44 -08:00
parent 244442939d
commit 611284fcc2
7 changed files with 13 additions and 12 deletions

View File

@@ -518,7 +518,7 @@ static bool rewriteAllocBoxAsAllocStack(AllocBoxInst *ABI) {
auto *User = HeapBox->getSingleUse()->getUser();
if (auto *MUI = dyn_cast<MarkUninitializedInst>(User)) {
HeapBox = MUI;
Kind = MUI->getKind();
Kind = MUI->getMarkUninitializedKind();
}
}