Remove assertion all together and use getAddressOfStackInit instead of dyn_cast to StoreInst

This commit is contained in:
zoecarver
2019-11-04 11:01:39 -08:00
parent f3ac3bd08b
commit f1c75f6d62
2 changed files with 3 additions and 5 deletions

View File

@@ -472,9 +472,6 @@ SILValue swift::castValueToABICompatibleType(SILBuilder *builder,
if (srcTy == destTy)
return value;
if (srcTy.isAddress() == destTy.isAddress())
return nullptr;
if (srcTy.isAddress() && destTy.isAddress()) {
// Cast between two addresses and that's it.
return builder->createUncheckedAddrCast(loc, value, destTy);