Skip to content

Commit 4513005

Browse files
authored
Merge pull request #71484 from meg-gupta/renamesonly
[NFC] Rename some lifetime dependence internal types
2 parents 92d0d29 + efbd9da commit 4513005

11 files changed

+50
-83
lines changed

include/swift/AST/LifetimeDependence.h

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,7 @@ class LifetimeDependenceSpecifier {
131131

132132
class LifetimeDependenceInfo {
133133
IndexSubset *inheritLifetimeParamIndices;
134-
IndexSubset *borrowLifetimeParamIndices;
135-
IndexSubset *mutateLifetimeParamIndices;
134+
IndexSubset *scopeLifetimeParamIndices;
136135

137136
static LifetimeDependenceInfo getForParamIndex(AbstractFunctionDecl *afd,
138137
unsigned index,
@@ -147,31 +146,24 @@ class LifetimeDependenceInfo {
147146
public:
148147
LifetimeDependenceInfo()
149148
: inheritLifetimeParamIndices(nullptr),
150-
borrowLifetimeParamIndices(nullptr),
151-
mutateLifetimeParamIndices(nullptr) {}
149+
scopeLifetimeParamIndices(nullptr) {}
152150
LifetimeDependenceInfo(IndexSubset *inheritLifetimeParamIndices,
153-
IndexSubset *borrowLifetimeParamIndices,
154-
IndexSubset *mutateLifetimeParamIndices)
151+
IndexSubset *scopeLifetimeParamIndices)
155152
: inheritLifetimeParamIndices(inheritLifetimeParamIndices),
156-
borrowLifetimeParamIndices(borrowLifetimeParamIndices),
157-
mutateLifetimeParamIndices(mutateLifetimeParamIndices) {}
153+
scopeLifetimeParamIndices(scopeLifetimeParamIndices) {}
158154

159155
operator bool() const { return !empty(); }
160156

161157
bool empty() const {
162158
return inheritLifetimeParamIndices == nullptr &&
163-
borrowLifetimeParamIndices == nullptr &&
164-
mutateLifetimeParamIndices == nullptr;
159+
scopeLifetimeParamIndices == nullptr;
165160
}
166161

167162
bool hasInheritLifetimeParamIndices() const {
168163
return inheritLifetimeParamIndices != nullptr;
169164
}
170165
bool hasBorrowLifetimeParamIndices() const {
171-
return borrowLifetimeParamIndices != nullptr;
172-
}
173-
bool hasMutateLifetimeParamIndices() const {
174-
return mutateLifetimeParamIndices != nullptr;
166+
return scopeLifetimeParamIndices != nullptr;
175167
}
176168

177169
std::string getString() const;

lib/Sema/LifetimeDependence.cpp

Lines changed: 17 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,9 @@ std::string LifetimeDependenceInfo::getString() const {
4040
lifetimeDependenceString =
4141
"_inherit(" + getOnIndices(inheritLifetimeParamIndices) + ")";
4242
}
43-
if (borrowLifetimeParamIndices && !borrowLifetimeParamIndices->isEmpty()) {
43+
if (scopeLifetimeParamIndices && !scopeLifetimeParamIndices->isEmpty()) {
4444
lifetimeDependenceString +=
45-
"_borrow(" + getOnIndices(borrowLifetimeParamIndices) + ")";
46-
}
47-
if (mutateLifetimeParamIndices && !mutateLifetimeParamIndices->isEmpty()) {
48-
lifetimeDependenceString +=
49-
"_mutate(" + getOnIndices(mutateLifetimeParamIndices) + ")";
45+
"_scope(" + getOnIndices(scopeLifetimeParamIndices) + ")";
5046
}
5147
return lifetimeDependenceString;
5248
}
@@ -55,11 +51,8 @@ void LifetimeDependenceInfo::Profile(llvm::FoldingSetNodeID &ID) const {
5551
if (inheritLifetimeParamIndices) {
5652
inheritLifetimeParamIndices->Profile(ID);
5753
}
58-
if (borrowLifetimeParamIndices) {
59-
borrowLifetimeParamIndices->Profile(ID);
60-
}
61-
if (mutateLifetimeParamIndices) {
62-
mutateLifetimeParamIndices->Profile(ID);
54+
if (scopeLifetimeParamIndices) {
55+
scopeLifetimeParamIndices->Profile(ID);
6356
}
6457
}
6558

@@ -71,18 +64,12 @@ LifetimeDependenceInfo LifetimeDependenceInfo::getForParamIndex(
7164
auto indexSubset = IndexSubset::get(ctx, capacity, {index});
7265
if (ownership == ValueOwnership::Owned) {
7366
return LifetimeDependenceInfo{/*inheritLifetimeParamIndices*/ indexSubset,
74-
/*borrowLifetimeParamIndices*/ nullptr,
75-
/*mutateLifetimeParamIndices*/ nullptr};
76-
}
77-
if (ownership == ValueOwnership::Shared) {
78-
return LifetimeDependenceInfo{/*inheritLifetimeParamIndices*/ nullptr,
79-
/*borrowLifetimeParamIndices*/ indexSubset,
80-
/*mutateLifetimeParamIndices*/ nullptr};
67+
/*scopeLifetimeParamIndices*/ nullptr};
8168
}
82-
assert(ownership == ValueOwnership::InOut);
69+
assert(ownership == ValueOwnership::Shared ||
70+
ownership == ValueOwnership::InOut);
8371
return LifetimeDependenceInfo{/*inheritLifetimeParamIndices*/ nullptr,
84-
/*borrowLifetimeParamIndices*/ nullptr,
85-
/*mutateLifetimeParamIndices*/ indexSubset};
72+
/*scopeLifetimeParamIndices*/ indexSubset};
8673
}
8774

8875
void LifetimeDependenceInfo::getConcatenatedData(
@@ -105,10 +92,7 @@ void LifetimeDependenceInfo::getConcatenatedData(
10592
pushData(inheritLifetimeParamIndices);
10693
}
10794
if (hasBorrowLifetimeParamIndices()) {
108-
pushData(borrowLifetimeParamIndices);
109-
}
110-
if (hasMutateLifetimeParamIndices()) {
111-
pushData(mutateLifetimeParamIndices);
95+
pushData(scopeLifetimeParamIndices);
11296
}
11397
}
11498

@@ -123,8 +107,7 @@ LifetimeDependenceInfo::fromTypeRepr(AbstractFunctionDecl *afd, Type resultType,
123107
cast<LifetimeDependentReturnTypeRepr>(afd->getResultTypeRepr());
124108

125109
SmallBitVector inheritLifetimeParamIndices(capacity);
126-
SmallBitVector borrowLifetimeParamIndices(capacity);
127-
SmallBitVector mutateLifetimeParamIndices(capacity);
110+
SmallBitVector scopeLifetimeParamIndices(capacity);
128111

129112
auto updateLifetimeDependenceInfo = [&](LifetimeDependenceSpecifier specifier,
130113
unsigned paramIndexToSet,
@@ -160,18 +143,17 @@ LifetimeDependenceInfo::fromTypeRepr(AbstractFunctionDecl *afd, Type resultType,
160143
return true;
161144
}
162145
if (inheritLifetimeParamIndices.test(paramIndexToSet) ||
163-
borrowLifetimeParamIndices.test(paramIndexToSet)) {
146+
scopeLifetimeParamIndices.test(paramIndexToSet)) {
164147
diags.diagnose(loc, diag::lifetime_dependence_duplicate_param_id);
165148
return true;
166149
}
167150
if (kind == LifetimeDependenceKind::Copy ||
168151
kind == LifetimeDependenceKind::Consume) {
169152
inheritLifetimeParamIndices.set(paramIndexToSet);
170-
} else if (kind == LifetimeDependenceKind::Borrow) {
171-
borrowLifetimeParamIndices.set(paramIndexToSet);
172153
} else {
173-
assert(kind == LifetimeDependenceKind::Mutate);
174-
mutateLifetimeParamIndices.set(paramIndexToSet);
154+
assert(kind == LifetimeDependenceKind::Borrow ||
155+
kind == LifetimeDependenceKind::Mutate);
156+
scopeLifetimeParamIndices.set(paramIndexToSet);
175157
}
176158
return false;
177159
};
@@ -245,11 +227,8 @@ LifetimeDependenceInfo::fromTypeRepr(AbstractFunctionDecl *afd, Type resultType,
245227
inheritLifetimeParamIndices.any()
246228
? IndexSubset::get(ctx, inheritLifetimeParamIndices)
247229
: nullptr,
248-
borrowLifetimeParamIndices.any()
249-
? IndexSubset::get(ctx, borrowLifetimeParamIndices)
250-
: nullptr,
251-
mutateLifetimeParamIndices.any()
252-
? IndexSubset::get(ctx, mutateLifetimeParamIndices)
230+
scopeLifetimeParamIndices.any()
231+
? IndexSubset::get(ctx, scopeLifetimeParamIndices)
253232
: nullptr);
254233
}
255234

@@ -344,4 +323,5 @@ LifetimeDependenceInfo::get(AbstractFunctionDecl *afd, Type resultType,
344323
}
345324
return LifetimeDependenceInfo::infer(afd, resultType);
346325
}
326+
347327
} // namespace swift

lib/Serialization/Deserialization.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8610,12 +8610,11 @@ bool ModuleFile::maybeReadLifetimeDependence(
86108610
return false;
86118611
}
86128612

8613-
bool hasInheritLifetimeParamIndices, hasBorrowLifetimeParamIndices,
8614-
hasMutateLifetimeParamIndices;
8613+
bool hasInheritLifetimeParamIndices, hasBorrowLifetimeParamIndices;
86158614
ArrayRef<uint64_t> lifetimeDependenceData;
8616-
LifetimeDependenceLayout::readRecord(
8617-
scratch, hasInheritLifetimeParamIndices, hasBorrowLifetimeParamIndices,
8618-
hasMutateLifetimeParamIndices, lifetimeDependenceData);
8615+
LifetimeDependenceLayout::readRecord(scratch, hasInheritLifetimeParamIndices,
8616+
hasBorrowLifetimeParamIndices,
8617+
lifetimeDependenceData);
86198618

86208619
unsigned startIndex = 0;
86218620
auto pushData = [&](LifetimeDependenceKind kind) {
@@ -8635,8 +8634,5 @@ bool ModuleFile::maybeReadLifetimeDependence(
86358634
if (hasBorrowLifetimeParamIndices) {
86368635
pushData(LifetimeDependenceKind::Borrow);
86378636
}
8638-
if (hasMutateLifetimeParamIndices) {
8639-
pushData(LifetimeDependenceKind::Mutate);
8640-
}
86418637
return true;
86428638
}

lib/Serialization/ModuleFormat.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const uint16_t SWIFTMODULE_VERSION_MAJOR = 0;
5858
/// describe what change you made. The content of this comment isn't important;
5959
/// it just ensures a conflict if two people change the module format.
6060
/// Don't worry about adhering to the 80-column limit for this line.
61-
const uint16_t SWIFTMODULE_VERSION_MINOR = 848; // inroduced a package SIL linkage
61+
const uint16_t SWIFTMODULE_VERSION_MINOR = 849; // update LifetimeDependence
6262

6363
/// A standard hash seed used for all string hashes in a serialized module.
6464
///
@@ -2179,7 +2179,6 @@ namespace decls_block {
21792179
BCRecordLayout<LIFETIME_DEPENDENCE,
21802180
BCFixed<1>, // hasInheritLifetimeParamIndices
21812181
BCFixed<1>, // hasBorrowLifetimeParamIndices
2182-
BCFixed<1>, // hasMutateLifetimeParamIndices
21832182
BCArray<BCFixed<1>> // concatenated param indices
21842183
>;
21852184

lib/Serialization/Serialization.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3517,8 +3517,7 @@ class Serializer::DeclSerializer : public DeclVisitor<DeclSerializer> {
35173517
LifetimeDependenceLayout::emitRecord(
35183518
S.Out, S.ScratchRecord, abbrCode,
35193519
lifetimeDependenceInfo.hasInheritLifetimeParamIndices(),
3520-
lifetimeDependenceInfo.hasBorrowLifetimeParamIndices(),
3521-
lifetimeDependenceInfo.hasMutateLifetimeParamIndices(), paramIndices);
3520+
lifetimeDependenceInfo.hasBorrowLifetimeParamIndices(), paramIndices);
35223521
}
35233522

35243523
void writeGenericParams(const GenericParamList *genericParams) {

test/SIL/explicit_lifetime_dependence_specifiers.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ struct BufferView : ~Escapable {
2222
}
2323
self.ptr = ptr
2424
}
25-
// CHECK: sil hidden @$s39explicit_lifetime_dependence_specifiers10BufferViewVyACSW_SaySiGhtcfC : $@convention(method) (UnsafeRawBufferPointer, @guaranteed Array<Int>, @thin BufferView.Type) -> _borrow(2) @owned BufferView {
25+
// CHECK: sil hidden @$s39explicit_lifetime_dependence_specifiers10BufferViewVyACSW_SaySiGhtcfC : $@convention(method) (UnsafeRawBufferPointer, @guaranteed Array<Int>, @thin BufferView.Type) -> _scope(2) @owned BufferView {
2626
init(_ ptr: UnsafeRawBufferPointer, _ a: borrowing Array<Int>) -> _borrow(a) Self {
2727
self.ptr = ptr
2828
return self
@@ -32,7 +32,7 @@ struct BufferView : ~Escapable {
3232
self.ptr = ptr
3333
return self
3434
}
35-
// CHECK: sil hidden @$s39explicit_lifetime_dependence_specifiers10BufferViewVyACSW_SaySdGSaySiGhtcfC : $@convention(method) (UnsafeRawBufferPointer, @owned Array<Double>, @guaranteed Array<Int>, @thin BufferView.Type) -> _inherit(2)_borrow(3) @owned BufferView {
35+
// CHECK: sil hidden @$s39explicit_lifetime_dependence_specifiers10BufferViewVyACSW_SaySdGSaySiGhtcfC : $@convention(method) (UnsafeRawBufferPointer, @owned Array<Double>, @guaranteed Array<Int>, @thin BufferView.Type) -> _inherit(2)_scope(3) @owned BufferView {
3636
init(_ ptr: UnsafeRawBufferPointer, _ a: consuming Array<Double>, _ b: borrowing Array<Int>) -> _consume(a) _borrow(b) Self {
3737
self.ptr = ptr
3838
return self
@@ -59,7 +59,7 @@ func testBasic() {
5959
}
6060
}
6161

62-
// CHECK-LABEL: sil hidden @$s39explicit_lifetime_dependence_specifiers6deriveyAA10BufferViewVADF : $@convention(thin) (@guaranteed BufferView) -> _borrow(1) @owned BufferView {
62+
// CHECK-LABEL: sil hidden @$s39explicit_lifetime_dependence_specifiers6deriveyAA10BufferViewVADF : $@convention(thin) (@guaranteed BufferView) -> _scope(1) @owned BufferView {
6363
func derive(_ x: borrowing BufferView) -> _borrow(x) BufferView {
6464
return BufferView(x.ptr)
6565
}
@@ -69,15 +69,15 @@ func consumeAndCreate(_ x: consuming BufferView) -> _copy(x) BufferView {
6969
return BufferView(x.ptr)
7070
}
7171

72-
// CHECK-LABEL: sil hidden @$s39explicit_lifetime_dependence_specifiers17deriveThisOrThat1yAA10BufferViewVAD_ADtF : $@convention(thin) (@guaranteed BufferView, @guaranteed BufferView) -> _borrow(1, 2) @owned BufferView {
72+
// CHECK-LABEL: sil hidden @$s39explicit_lifetime_dependence_specifiers17deriveThisOrThat1yAA10BufferViewVAD_ADtF : $@convention(thin) (@guaranteed BufferView, @guaranteed BufferView) -> _scope(1, 2) @owned BufferView {
7373
func deriveThisOrThat1(_ this: borrowing BufferView, _ that: borrowing BufferView) -> _borrow(this, that) BufferView {
7474
if (Int.random(in: 1..<100) == 0) {
7575
return BufferView(this.ptr)
7676
}
7777
return BufferView(that.ptr)
7878
}
7979

80-
// CHECK-LABEL: sil hidden @$s39explicit_lifetime_dependence_specifiers17deriveThisOrThat2yAA10BufferViewVAD_ADntF : $@convention(thin) (@guaranteed BufferView, @owned BufferView) -> _inherit(2)_borrow(1) @owned BufferView {
80+
// CHECK-LABEL: sil hidden @$s39explicit_lifetime_dependence_specifiers17deriveThisOrThat2yAA10BufferViewVAD_ADntF : $@convention(thin) (@guaranteed BufferView, @owned BufferView) -> _inherit(2)_scope(1) @owned BufferView {
8181
func deriveThisOrThat2(_ this: borrowing BufferView, _ that: consuming BufferView) -> _borrow(this) _copy(that) BufferView {
8282
if (Int.random(in: 1..<100) == 0) {
8383
return BufferView(this.ptr)
@@ -92,7 +92,7 @@ struct Wrapper : ~Escapable {
9292
init(_ view: consuming BufferView) {
9393
self.view = view
9494
}
95-
// CHECK-LABEL: sil hidden @$s39explicit_lifetime_dependence_specifiers7WrapperV8getView1AA10BufferViewVyF : $@convention(method) (@guaranteed Wrapper) -> _borrow(0) @owned BufferView {
95+
// CHECK-LABEL: sil hidden @$s39explicit_lifetime_dependence_specifiers7WrapperV8getView1AA10BufferViewVyF : $@convention(method) (@guaranteed Wrapper) -> _scope(0) @owned BufferView {
9696
borrowing func getView1() -> _borrow(self) BufferView {
9797
return view
9898
}

test/SIL/implicit_lifetime_dependence.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ struct BufferView : ~Escapable {
1616
init(_ ptr: UnsafeRawBufferPointer) {
1717
self.ptr = ptr
1818
}
19-
// CHECK-LABEL: sil hidden @$s28implicit_lifetime_dependence10BufferViewVyA2ChcfC : $@convention(method) (@guaranteed BufferView, @thin BufferView.Type) -> _borrow(1) @owned BufferView {
19+
// CHECK-LABEL: sil hidden @$s28implicit_lifetime_dependence10BufferViewVyA2ChcfC : $@convention(method) (@guaranteed BufferView, @thin BufferView.Type) -> _scope(1) @owned BufferView {
2020
init(_ otherBV: borrowing BufferView) {
2121
self.ptr = otherBV.ptr
2222
}
@@ -48,7 +48,7 @@ func testBasic() {
4848
}
4949
*/
5050

51-
// CHECK-LABEL: sil hidden @$s28implicit_lifetime_dependence6deriveyAA10BufferViewVADF : $@convention(thin) (@guaranteed BufferView) -> _borrow(1) @owned BufferView {
51+
// CHECK-LABEL: sil hidden @$s28implicit_lifetime_dependence6deriveyAA10BufferViewVADF : $@convention(thin) (@guaranteed BufferView) -> _scope(1) @owned BufferView {
5252
func derive(_ x: borrowing BufferView) -> BufferView {
5353
return BufferView(x.ptr)
5454
}
@@ -65,7 +65,7 @@ struct Wrapper : ~Escapable {
6565
init(_ view: consuming BufferView) {
6666
self.view = view
6767
}
68-
// CHECK-LABEL: sil hidden @$s28implicit_lifetime_dependence7WrapperV8getView1AA10BufferViewVyF : $@convention(method) (@guaranteed Wrapper) -> _borrow(0) @owned BufferView {
68+
// CHECK-LABEL: sil hidden @$s28implicit_lifetime_dependence7WrapperV8getView1AA10BufferViewVyF : $@convention(method) (@guaranteed Wrapper) -> _scope(0) @owned BufferView {
6969
borrowing func getView1() -> BufferView {
7070
return view
7171
}

test/SIL/lifetime_dependence_generics.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ public func test(pview: consuming PView) -> _consume(pview) View {
2929
return pview.getDefault()
3030
}
3131

32-
// CHECK: sil hidden @$s28lifetime_dependence_generics1PPAAE10getDefault1EQzyF : $@convention(method) <Self where Self : P> (@in_guaranteed Self) -> _borrow(0) @out Self.E {
32+
// CHECK: sil hidden @$s28lifetime_dependence_generics1PPAAE10getDefault1EQzyF : $@convention(method) <Self where Self : P> (@in_guaranteed Self) -> _scope(0) @out Self.E {
3333

34-
// CHECK: sil hidden @$s28lifetime_dependence_generics5PViewV4getEAA4ViewVyF : $@convention(method) (PView) -> _borrow(0) @owned View {
34+
// CHECK: sil hidden @$s28lifetime_dependence_generics5PViewV4getEAA4ViewVyF : $@convention(method) (PView) -> _scope(0) @owned View {
3535

36-
// CHECK: sil private [transparent] [thunk] @$s28lifetime_dependence_generics5PViewVAA1PA2aDP4getE1EQzyFTW : $@convention(witness_method: P) (@in_guaranteed PView) -> _borrow(0) @out View {
36+
// CHECK: sil private [transparent] [thunk] @$s28lifetime_dependence_generics5PViewVAA1PA2aDP4getE1EQzyFTW : $@convention(witness_method: P) (@in_guaranteed PView) -> _scope(0) @out View {
3737

3838
// CHECK: sil @$s28lifetime_dependence_generics4test5pviewAA4ViewVAA5PViewVn_tF : $@convention(thin) (PView) -> _inherit(1) @owned View {

test/SILOptimizer/lifetime_dependence_diagnostics_param_fail.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// RUN: %target-swift-frontend %s -emit-sil -o /dev/null -verify \
22
// RUN: -module-name test \
33
// RUN: -enable-builtin-module \
4+
// RUN: -Xllvm -enable-lifetime-dependence-diagnostics=true \
45
// RUN: -enable-experimental-feature NonescapableTypes \
56
// RUN: -enable-experimental-feature NoncopyableGenerics
67

test/Serialization/explicit_lifetime_dependence.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ func testInitializers() {
3939
use(mysteryView)
4040
}
4141
}
42-
// CHECK: sil @$s32def_explicit_lifetime_dependence6deriveyAA10BufferViewVADF : $@convention(thin) (@guaranteed BufferView) -> _borrow(1) @owned BufferView
42+
// CHECK: sil @$s32def_explicit_lifetime_dependence6deriveyAA10BufferViewVADF : $@convention(thin) (@guaranteed BufferView) -> _scope(1) @owned BufferView
4343
// CHECK: sil @$s32def_explicit_lifetime_dependence16consumeAndCreateyAA10BufferViewVADnF : $@convention(thin) (@owned BufferView) -> _inherit(1) @owned BufferView
44-
// CHECK: sil @$s32def_explicit_lifetime_dependence15borrowAndCreateyAA10BufferViewVADF : $@convention(thin) (@guaranteed BufferView) -> _borrow(1) @owned BufferView
45-
// CHECK: sil @$s32def_explicit_lifetime_dependence16deriveThisOrThatyAA10BufferViewVAD_ADtF : $@convention(thin) (@guaranteed BufferView, @guaranteed BufferView) -> _borrow(1, 2) @owned BufferView
44+
// CHECK: sil @$s32def_explicit_lifetime_dependence15borrowAndCreateyAA10BufferViewVADF : $@convention(thin) (@guaranteed BufferView) -> _scope(1) @owned BufferView
45+
// CHECK: sil @$s32def_explicit_lifetime_dependence16deriveThisOrThatyAA10BufferViewVAD_ADtF : $@convention(thin) (@guaranteed BufferView, @guaranteed BufferView) -> _scope(1, 2) @owned BufferView
4646

47-
// CHECK: sil @$s32def_explicit_lifetime_dependence10BufferViewVyACSW_SaySiGhtcfC : $@convention(method) (UnsafeRawBufferPointer, @guaranteed Array<Int>, @thin BufferView.Type) -> _borrow(2) @owned BufferView
47+
// CHECK: sil @$s32def_explicit_lifetime_dependence10BufferViewVyACSW_SaySiGhtcfC : $@convention(method) (UnsafeRawBufferPointer, @guaranteed Array<Int>, @thin BufferView.Type) -> _scope(2) @owned BufferView
4848

49-
// CHECK: sil @$s32def_explicit_lifetime_dependence10BufferViewVyACSW_SaySiGADhtcfC : $@convention(method) (UnsafeRawBufferPointer, @owned Array<Int>, @guaranteed Array<Int>, @thin BufferView.Type) -> _inherit(2)_borrow(3) @owned BufferView
49+
// CHECK: sil @$s32def_explicit_lifetime_dependence10BufferViewVyACSW_SaySiGADhtcfC : $@convention(method) (UnsafeRawBufferPointer, @owned Array<Int>, @guaranteed Array<Int>, @thin BufferView.Type) -> _inherit(2)_scope(3) @owned BufferView

0 commit comments

Comments
 (0)