@@ -202,21 +202,22 @@ SILValue EscapeAnalysis::getPointerBase(SILValue value) {
202202 case ValueKind::RefToRawPointerInst:
203203 case ValueKind::RefToBridgeObjectInst:
204204 case ValueKind::BridgeObjectToRefInst:
205+ return cast<SingleValueInstruction>(value)->getOperand (0 );
206+
205207 case ValueKind::UnconditionalCheckedCastInst:
208+ case ValueKind::UncheckedAddrCastInst:
206209 // DO NOT use LOADABLE_REF_STORAGE because unchecked references don't have
207210 // retain/release instructions that trigger the 'default' case.
208211#define ALWAYS_OR_SOMETIMES_LOADABLE_CHECKED_REF_STORAGE (Name, ...) \
209212 case ValueKind::RefTo##Name##Inst: \
210213 case ValueKind::Name##ToRefInst:
211214#include " swift/AST/ReferenceStorage.def"
212- return cast<SingleValueInstruction>(value)->getOperand (0 );
213-
214- case ValueKind::UncheckedAddrCastInst: {
215- auto *uac = cast<UncheckedAddrCastInst>(value);
216- SILValue op = uac->getOperand ();
215+ {
216+ auto *svi = cast<SingleValueInstruction>(value);
217+ SILValue op = svi->getOperand (0 );
217218 SILType srcTy = op->getType ().getObjectType ();
218219 SILType destTy = value->getType ().getObjectType ();
219- SILFunction *f = uac ->getFunction ();
220+ SILFunction *f = svi ->getFunction ();
220221 // If the source and destination of the cast don't agree on being a pointer,
221222 // we bail. Otherwise we would miss important edges in the connection graph:
222223 // e.g. loads of non-pointers are ignored, while it could be an escape of
0 commit comments