Skip to content

Commit 25f0e2f

Browse files
committed
[NFC] Replace @guaranteed_addr by @guaranteed_address
1 parent 06eb315 commit 25f0e2f

File tree

11 files changed

+103
-103
lines changed

11 files changed

+103
-103
lines changed

SwiftCompilerSources/Sources/SIL/Argument.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ public enum ArgumentConvention : CustomStringConvertible {
489489
case .pack:
490490
self = .packOut
491491
case .guaranteed, .guaranteedAddress, .inout:
492-
fatalError("Result conventions @guaranteed, @guaranteed_addr and @inout are always returned directly")
492+
fatalError("Result conventions @guaranteed, @guaranteed_address and @inout are always returned directly")
493493
}
494494
}
495495

include/swift/AST/TypeAttr.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ SIMPLE_SIL_TYPE_ATTR(pack_out, PackOut)
9595
SIMPLE_SIL_TYPE_ATTR(owned, Owned)
9696
SIMPLE_SIL_TYPE_ATTR(unowned_inner_pointer, UnownedInnerPointer)
9797
SIMPLE_SIL_TYPE_ATTR(guaranteed, Guaranteed)
98-
SIMPLE_SIL_TYPE_ATTR(guaranteed_addr, GuaranteedAddress)
98+
SIMPLE_SIL_TYPE_ATTR(guaranteed_address, GuaranteedAddress)
9999
SIMPLE_SIL_TYPE_ATTR(autoreleased, Autoreleased)
100100
SIMPLE_SIL_TYPE_ATTR(callee_owned, CalleeOwned)
101101
SIMPLE_SIL_TYPE_ATTR(callee_guaranteed, CalleeGuaranteed)

lib/AST/ASTPrinter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7941,7 +7941,7 @@ static StringRef getStringForResultConvention(ResultConvention conv) {
79417941
case ResultConvention::Autoreleased: return "@autoreleased ";
79427942
case ResultConvention::Pack: return "@pack_out ";
79437943
case ResultConvention::GuaranteedAddress:
7944-
return "@guaranteed_addr ";
7944+
return "@guaranteed_address ";
79457945
case ResultConvention::Guaranteed:
79467946
return "@guaranteed ";
79477947
case ResultConvention::Inout:

lib/Demangling/Demangler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2297,7 +2297,7 @@ NodePointer Demangler::demangleImplResultConvention(Node::Kind ConvKind) {
22972297
case 'a': attr = "@autoreleased"; break;
22982298
case 'k': attr = "@pack_out"; break;
22992299
case 'l':
2300-
attr = "@guaranteed_addr";
2300+
attr = "@guaranteed_address";
23012301
break;
23022302
case 'g':
23032303
attr = "@guaranteed";

lib/Demangling/Remangler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2234,7 +2234,7 @@ ManglingError Remangler::mangleImplFunctionType(Node *node, unsigned depth) {
22342234
.Case("@unowned_inner_pointer", 'u')
22352235
.Case("@autoreleased", 'a')
22362236
.Case("@pack_out", 'k')
2237-
.Case("@guaranteed_addr", 'l')
2237+
.Case("@guaranteed_address", 'l')
22382238
.Case("@guaranteed", 'g')
22392239
.Case("@inout", 'm')
22402240
.Default(0);

lib/IRGen/GenCall.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3981,7 +3981,7 @@ void CallEmission::emitToExplosion(Explosion &out, bool isOutlined) {
39813981

39823982
if (fnConv.hasAddressResult()) {
39833983
assert(LastArgWritten == 0 &&
3984-
"@guaranteed_addr/@inout along with indirect result?");
3984+
"@guaranteed_address/@inout along with indirect result?");
39853985
emitAddressResultToExplosion(out);
39863986
return;
39873987
}

test/SIL/OwnershipVerifier/borrow_accessor.sil

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ bb0(%0 : @guaranteed $Wrapper):
1919
return %2
2020
}
2121

22-
sil [ossa] @borrow_addressonly_prop : $@convention(method) <T> (@in_guaranteed GenWrapper<T>) -> @guaranteed_addr T {
22+
sil [ossa] @borrow_addressonly_prop : $@convention(method) <T> (@in_guaranteed GenWrapper<T>) -> @guaranteed_address T {
2323
bb0(%0 : $*GenWrapper<T>):
2424
%2 = struct_element_addr %0, #GenWrapper._prop
2525
return %2
@@ -154,8 +154,8 @@ bb0(%0 : @owned $Wrapper):
154154
// TODO: Add verification support in MemoryLifetimeVerifier
155155
sil [ossa] @test_use_after_free_address_only : $@convention(thin) <T> (@in GenWrapper<T>) -> () {
156156
bb0(%0 : $*GenWrapper<T>):
157-
%1 = function_ref @borrow_addressonly_prop : $@convention(method) <τ_0_0> (@in_guaranteed GenWrapper<τ_0_0>) -> @guaranteed_addr τ_0_0
158-
%2 = apply %1<T>(%0) : $@convention(method) <τ_0_0> (@in_guaranteed GenWrapper<τ_0_0>) -> @guaranteed_addr τ_0_0
157+
%1 = function_ref @borrow_addressonly_prop : $@convention(method) <τ_0_0> (@in_guaranteed GenWrapper<τ_0_0>) -> @guaranteed_address τ_0_0
158+
%2 = apply %1<T>(%0) : $@convention(method) <τ_0_0> (@in_guaranteed GenWrapper<τ_0_0>) -> @guaranteed_address τ_0_0
159159
%3 = function_ref @use_T : $@convention(thin) <τ_0_0> (@in_guaranteed τ_0_0) -> ()
160160
destroy_addr %0
161161
%5 = apply %3<T>(%2) : $@convention(thin) <τ_0_0> (@in_guaranteed τ_0_0) -> ()

test/SIL/Parser/borrow_accessor.sil

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ bb0(%0 : @guaranteed $Wrapper):
1919
return %2
2020
}
2121

22-
// CHECK-LABEL: sil [ossa] @borrow_addressonly_prop : $@convention(method) <T> (@in_guaranteed GenWrapper<T>) -> @guaranteed_addr T {
23-
sil [ossa] @borrow_addressonly_prop : $@convention(method) <T> (@in_guaranteed GenWrapper<T>) -> @guaranteed_addr T {
22+
// CHECK-LABEL: sil [ossa] @borrow_addressonly_prop : $@convention(method) <T> (@in_guaranteed GenWrapper<T>) -> @guaranteed_address T {
23+
sil [ossa] @borrow_addressonly_prop : $@convention(method) <T> (@in_guaranteed GenWrapper<T>) -> @guaranteed_address T {
2424
bb0(%0 : $*GenWrapper<T>):
2525
%2 = struct_element_addr %0, #GenWrapper._prop
2626
return %2
@@ -61,8 +61,8 @@ bb0(%0 : @owned $Wrapper):
6161

6262
sil [ossa] @test2 : $@convention(thin) <T> (@in GenWrapper<T>) -> () {
6363
bb0(%0 : $*GenWrapper<T>):
64-
%1 = function_ref @borrow_addressonly_prop : $@convention(method) <τ_0_0> (@in_guaranteed GenWrapper<τ_0_0>) -> @guaranteed_addr τ_0_0
65-
%2 = apply %1<T>(%0) : $@convention(method) <τ_0_0> (@in_guaranteed GenWrapper<τ_0_0>) -> @guaranteed_addr τ_0_0
64+
%1 = function_ref @borrow_addressonly_prop : $@convention(method) <τ_0_0> (@in_guaranteed GenWrapper<τ_0_0>) -> @guaranteed_address τ_0_0
65+
%2 = apply %1<T>(%0) : $@convention(method) <τ_0_0> (@in_guaranteed GenWrapper<τ_0_0>) -> @guaranteed_address τ_0_0
6666
%3 = function_ref @use_T : $@convention(thin) <τ_0_0> (@in_guaranteed τ_0_0) -> ()
6767
%4 = apply %3<T>(%2) : $@convention(thin) <τ_0_0> (@in_guaranteed τ_0_0) -> ()
6868
destroy_addr %0

0 commit comments

Comments
 (0)