Handle undefs in a few utilities used in RLE (#59448)

This commit is contained in:
Meghana Gupta
2022-06-15 14:37:46 -07:00
committed by GitHub
parent a0a0ebb558
commit 768a82f2cf
3 changed files with 27 additions and 0 deletions

View File

@@ -257,6 +257,8 @@ public:
SILValue materialize(SILInstruction *Inst) {
if (CoveringValue)
return SILValue();
if (isa<SILUndef>(Base))
return Base;
auto Val = Base;
auto InsertPt = getInsertAfterPoint(Base).getValue();
SILBuilderWithScope Builder(InsertPt);