Skip to content

Commit 7a28a02

Browse files
committed
Revert "[ownership] If we have an undef address, do not treat it as being owned. It is any."
This reverts commit e2c5404.
1 parent b668017 commit 7a28a02

File tree

2 files changed

+0
-69
lines changed

2 files changed

+0
-69
lines changed

lib/SIL/SILUndef.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,6 @@
1616
using namespace swift;
1717

1818
static ValueOwnershipKind getOwnershipKindForUndef(SILType type, const SILFunction &f) {
19-
if (type.isAddress()) {
20-
// If we have an address only type and we are supposed to use
21-
// lowered addresses, return Owned. Otherwise addresses are any.
22-
if (type.isAddressOnly(f) && f.getConventions().useLoweredAddresses()) {
23-
return ValueOwnershipKind::Owned;
24-
}
25-
return ValueOwnershipKind::Any;
26-
}
27-
2819
if (type.isTrivial(f))
2920
return ValueOwnershipKind::Any;
3021
return ValueOwnershipKind::Owned;

test/SIL/ownership-verifier/undef.sil

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)