Skip to content

Commit 0477878

Browse files
committed
[ownership] Address @atrick's post commit review for e2c5404
1 parent c6b8ae5 commit 0477878

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

lib/SIL/SILUndef.cpp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,7 @@
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-
28-
if (type.isTrivial(f))
19+
if (type.isAddress() || type.isTrivial(f))
2920
return ValueOwnershipKind::Any;
3021
return ValueOwnershipKind::Owned;
3122
}

0 commit comments

Comments
 (0)