File tree Expand file tree Collapse file tree 3 files changed +1
-9
lines changed Expand file tree Collapse file tree 3 files changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -63,9 +63,6 @@ class DeadEndBlocks;
63
63
class MultiDefPrunedLiveness ;
64
64
struct BorrowedValue ;
65
65
66
- // / Returns true if v is an address or trivial.
67
- bool isValueAddressOrTrivial (SILValue v);
68
-
69
66
// ===----------------------------------------------------------------------===//
70
67
// Forwarding Utilities
71
68
//
Original file line number Diff line number Diff line change @@ -83,11 +83,6 @@ bool swift::hasPointerEscape(BorrowedValue value) {
83
83
return false ;
84
84
}
85
85
86
- bool swift::isValueAddressOrTrivial (SILValue v) {
87
- return v->getType ().isAddress () ||
88
- v->getOwnershipKind () == OwnershipKind::None;
89
- }
90
-
91
86
bool swift::canOpcodeForwardGuaranteedValues (SILValue value) {
92
87
// If we have an argument from a transforming terminator, we can forward
93
88
// guaranteed.
Original file line number Diff line number Diff line change @@ -579,7 +579,7 @@ bool SILValueOwnershipChecker::checkValueWithoutLifetimeEndingUses(
579
579
}
580
580
}
581
581
582
- if (! isValueAddressOrTrivial ( value) ) {
582
+ if (value-> getOwnershipKind () != OwnershipKind::None ) {
583
583
return !errorBuilder.handleMalformedSIL ([&] {
584
584
if (value->getOwnershipKind () == OwnershipKind::Owned) {
585
585
llvm::errs () << " Error! Found a leaked owned value that was never "
You can’t perform that action at this time.
0 commit comments