We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6b8ae5 commit 0477878Copy full SHA for 0477878
lib/SIL/SILUndef.cpp
@@ -16,16 +16,7 @@
16
using namespace swift;
17
18
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))
+ if (type.isAddress() || type.isTrivial(f))
29
return ValueOwnershipKind::Any;
30
return ValueOwnershipKind::Owned;
31
}
0 commit comments