Skip to content

[ownership] Always print out ownership argument annotations whether o… #18186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion lib/ParseSIL/ParseSIL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5090,7 +5090,6 @@ bool SILParser::parseSILBasicBlock(SILBuilder &B) {
if (!F->getModule()
.getOptions()
.AssumeUnqualifiedOwnershipWhenParsing &&
F->getModule().getOptions().EnableSILOwnership &&
parseSILOwnership(OwnershipKind))
return true;

Expand Down
3 changes: 1 addition & 2 deletions lib/SIL/SILPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -581,8 +581,7 @@ class SILPrinter : public SILInstructionVisitor<SILPrinter> {

// If SIL ownership is enabled and the given function has not had ownership
// stripped out, print out ownership of SILArguments.
if (BB->getModule().getOptions().EnableSILOwnership &&
BB->getParent()->hasQualifiedOwnership()) {
if (BB->getParent()->hasQualifiedOwnership()) {
*this << getIDAndTypeAndOwnership(Args[0]);
for (SILArgument *Arg : Args.drop_front()) {
*this << ", " << getIDAndTypeAndOwnership(Arg);
Expand Down
2 changes: 1 addition & 1 deletion test/ClangImporter/static_inline.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// RUN: %target-swift-frontend -parse-as-library -module-name=static_inline -emit-sil %S/Inputs/static_inline.swift -enable-objc-interop -import-objc-header %S/Inputs/static_inline.h -o %t/static_inline.sil
// RUN: %FileCheck < %t/static_inline.sil %s
// RUN: %target-swift-frontend -parse-as-library -module-name=static_inline -O -emit-ir %t/static_inline.sil -enable-objc-interop -import-objc-header %S/Inputs/static_inline.h | %FileCheck --check-prefix=CHECK-IR %s
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -parse-as-library -module-name=static_inline -O -emit-ir %t/static_inline.sil -enable-objc-interop -import-objc-header %S/Inputs/static_inline.h | %FileCheck --check-prefix=CHECK-IR %s

// CHECK: sil shared [serializable] [clang c_inline_func] @c_inline_func : $@convention(c) (Int32) -> Int32

Expand Down
2 changes: 1 addition & 1 deletion test/DebugInfo/simple.sil
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Builtin
import Swift

sil @square : $@convention(thin) (Int32) -> Int32 {
bb0(%0 : $Int32):
bb0(%0 : @trivial $Int32):
debug_value %0 : $Int32, let, name "x" // id: %1
%3 = struct_extract %0 : $Int32, #Int32._value // user: %6
%4 = struct_extract %0 : $Int32, #Int32._value // user: %6
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/archetype_resilience.sil
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public enum EnumWithClassArchetypeAndDynamicSize<T : AnyObject> {
// CHECK: call %T20archetype_resilience36EnumWithClassArchetypeAndDynamicSizeO* @"$S20archetype_resilience36EnumWithClassArchetypeAndDynamicSizeOyxGRlzCr0_lWOc"(%T20archetype_resilience36EnumWithClassArchetypeAndDynamicSizeO* %0, %T20archetype_resilience36EnumWithClassArchetypeAndDynamicSizeO* {{.*}}, %swift.type* %"EnumWithClassArchetypeAndDynamicSize<T>")
// CHECK: ret void
sil @copyDynamicMultiEnum : $@convention(method) <T, U where T: AnyObject> (@in_guaranteed EnumWithClassArchetypeAndDynamicSize<T>) -> () {
bb0(%0 : $*EnumWithClassArchetypeAndDynamicSize<T>):
bb0(%0 : @trivial $*EnumWithClassArchetypeAndDynamicSize<T>):
%1 = alloc_stack $EnumWithClassArchetypeAndDynamicSize<T>
copy_addr %0 to [initialization] %1 : $*EnumWithClassArchetypeAndDynamicSize<T>
dealloc_stack %1 : $*EnumWithClassArchetypeAndDynamicSize<T>
Expand Down
6 changes: 3 additions & 3 deletions test/IRGen/autorelease.sil
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ import Swift
class C {}
sil_vtable C {}
sil @_TFC11autorelease1Cd : $@convention(method) (@owned C) -> @owned Builtin.NativeObject {
bb0(%0 : $C):
bb0(%0 : @owned $C):
%1 = unchecked_ref_cast %0 : $C to $Builtin.NativeObject // user: %2
return %1 : $Builtin.NativeObject // id: %2
}

sil @foo : $@convention(thin) (@owned C?) -> @autoreleased C? {
bb0(%0 : $C?):
bb0(%0 : @owned $C?):
return %0 : $C?
}
// x86_64: define{{( dllexport| protected)?}} swiftcc i64 @foo(i64) {{.*}} {
Expand Down Expand Up @@ -49,7 +49,7 @@ bb0(%0 : $C?):
// armv7k-NEXT: ret i32 [[T0]]

sil @bar : $@convention(thin) (@owned C?) -> @owned C? {
bb0(%0 : $C?):
bb0(%0 : @owned $C?):
%1 = function_ref @foo : $@convention(thin) (@owned C?) -> @autoreleased C?
%2 = apply %1(%0) : $@convention(thin) (@owned C?) -> @autoreleased C?
return %2 : $C?
Expand Down
4 changes: 2 additions & 2 deletions test/IRGen/autorelease_optimized_aarch64.sil
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class C {}
sil_vtable C {}

sil @_TFC21autorelease_optimized1Cd : $@convention(method) (@owned C) -> @owned Builtin.NativeObject {
bb0(%0 : $C):
bb0(%0 : @owned $C):
%1 = unchecked_ref_cast %0 : $C to $Builtin.NativeObject // user: %2
return %1 : $Builtin.NativeObject // id: %2
}
Expand All @@ -22,7 +22,7 @@ sil public_external @foo : $@convention(thin) (@owned C) -> @autoreleased C
sil public_external @bar : $@convention(thin) (@owned C) -> ()

sil @baz : $@convention(thin) (@owned C) -> () {
bb0(%0 : $C):
bb0(%0 : @owned $C):
%1 = function_ref @foo : $@convention(thin) (@owned C) -> @autoreleased C
%2 = apply %1(%0) : $@convention(thin) (@owned C) -> @autoreleased C

Expand Down
4 changes: 2 additions & 2 deletions test/IRGen/autorelease_optimized_armv7.sil
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class C {}
sil_vtable C {}

sil @_TFC21autorelease_optimized1Cd : $@convention(method) (@owned C) -> @owned Builtin.NativeObject {
bb0(%0 : $C):
bb0(%0 : @owned $C):
%1 = unchecked_ref_cast %0 : $C to $Builtin.NativeObject // user: %2
return %1 : $Builtin.NativeObject // id: %2
}
Expand All @@ -22,7 +22,7 @@ sil public_external @foo : $@convention(thin) (@owned C) -> @autoreleased C
sil public_external @bar : $@convention(thin) (@owned C) -> ()

sil @baz : $@convention(thin) (@owned C) -> () {
bb0(%0 : $C):
bb0(%0 : @owned $C):
%1 = function_ref @foo : $@convention(thin) (@owned C) -> @autoreleased C
%2 = apply %1(%0) : $@convention(thin) (@owned C) -> @autoreleased C

Expand Down
4 changes: 2 additions & 2 deletions test/IRGen/autorelease_optimized_x86_64.sil
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class C {}
sil_vtable C {}

sil @_TFC21autorelease_optimized1Cd : $@convention(method) (@owned C) -> @owned Builtin.NativeObject {
bb0(%0 : $C):
bb0(%0 : @owned $C):
%1 = unchecked_ref_cast %0 : $C to $Builtin.NativeObject // user: %2
return %1 : $Builtin.NativeObject // id: %2
}
Expand All @@ -22,7 +22,7 @@ sil public_external @foo : $@convention(thin) (@owned C) -> @autoreleased C
sil public_external @bar : $@convention(thin) (@owned C) -> ()

sil @baz : $@convention(thin) (@owned C) -> () {
bb0(%0 : $C):
bb0(%0 : @owned $C):
%1 = function_ref @foo : $@convention(thin) (@owned C) -> @autoreleased C
%2 = apply %1(%0) : $@convention(thin) (@owned C) -> @autoreleased C

Expand Down
6 changes: 3 additions & 3 deletions test/IRGen/big_types_tests.sil
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-swift-frontend -I %S/Inputs/abi %s -emit-ir -enable-large-loadable-types | %FileCheck %s
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -I %S/Inputs/abi %s -emit-ir -enable-large-loadable-types | %FileCheck %s

// REQUIRES: CPU=x86_64
// REQUIRES: OS=macosx
Expand All @@ -21,11 +21,11 @@ public struct BigStruct {

// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swiftcc void @testDestroyValue(%T15big_types_tests9BigStructV* noalias nocapture dereferenceable({{.*}}) #0 {
// CHECK-NEXT: entry
// CHECK-NEXT: call %T15big_types_tests9BigStructV* @"$S15big_types_tests9BigStructVWOh"(%T15big_types_tests9BigStructV* %0)
// CHECK-NEXT: call %T15big_types_tests9BigStructV* @"$S15big_types_tests9BigStructVWOs"(%T15big_types_tests9BigStructV* %0)
// CHECK-NEXT: ret void
sil @testDestroyValue : $@convention(thin) (@owned BigStruct) -> () {
entry(%x : $BigStruct):
destroy_value %x : $BigStruct
release_value %x : $BigStruct
%ret = tuple ()
return %ret : $()
}
4 changes: 2 additions & 2 deletions test/IRGen/builtin_word.sil
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ entry:
// ARM32: ret { i32, i64 } %4
// ARM32: }
sil @word_zextOrBitCast : $(Builtin.Int32, Builtin.Word) -> (Builtin.Word, Builtin.Int64) {
entry(%i : $Builtin.Int32, %w : $Builtin.Word):
entry(%i : @trivial $Builtin.Int32, %w : @trivial $Builtin.Word):
%j = builtin "zextOrBitCast_Int32_Word"(%i : $Builtin.Int32) : $Builtin.Word
%v = builtin "zextOrBitCast_Word_Int64"(%w : $Builtin.Word) : $Builtin.Int64
%t = tuple (%j : $Builtin.Word, %v : $Builtin.Int64)
Expand All @@ -58,7 +58,7 @@ entry(%i : $Builtin.Int32, %w : $Builtin.Word):
// ARM32: ret { i32, i32 } %4
// ARM32: }
sil @word_truncOrBitCast : $(Builtin.Word, Builtin.Int64) -> (Builtin.Int32, Builtin.Word) {
entry(%w : $Builtin.Word, %i : $Builtin.Int64):
entry(%w : @trivial $Builtin.Word, %i : @trivial $Builtin.Int64):
%v = builtin "truncOrBitCast_Word_Int32"(%w : $Builtin.Word) : $Builtin.Int32
%j = builtin "truncOrBitCast_Int64_Word"(%i : $Builtin.Int64) : $Builtin.Word
%t = tuple (%v : $Builtin.Int32, %j : $Builtin.Word)
Expand Down
10 changes: 5 additions & 5 deletions test/IRGen/class_isa_pointers.sil
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ sil_vtable Purebred {}
// CHECK: [[VTABLE:%.*]] = bitcast %swift.type* [[ISA]]
// CHECK: getelementptr inbounds {{.*}} [[VTABLE]]
sil @purebred_method : $@convention(thin) (@owned Purebred) -> () {
entry(%0 : $Purebred):
entry(%0 : @owned $Purebred):
%m = class_method %0 : $Purebred, #Purebred.method!1 : (Purebred) -> () -> (), $@convention(method) (@guaranteed Purebred) -> ()
%z = apply %m(%0) : $@convention(method) (@guaranteed Purebred) -> ()
return %z : $()
Expand All @@ -47,7 +47,7 @@ sil_vtable Mongrel {}
// CHECK: [[VTABLE:%.*]] = bitcast %swift.type* [[ISA]]
// CHECK: getelementptr inbounds {{.*}} [[VTABLE]]
sil @mongrel_method : $@convention(thin) (@owned Mongrel) -> () {
entry(%0 : $Mongrel):
entry(%0 : @owned $Mongrel):
%m = class_method %0 : $Mongrel, #Mongrel.method!1 : (Mongrel) -> () -> (), $@convention(method) (@guaranteed Mongrel) -> ()
%z = apply %m(%0) : $@convention(method) (@guaranteed Mongrel) -> ()
return %z : $()
Expand All @@ -56,14 +56,14 @@ entry(%0 : $Mongrel):
// ObjC stubs expected by ObjC metadata emission

sil private @$S18class_isa_pointers7MongrelC6methodyyFTo : $@convention(objc_method) (Purebred) -> () {
entry(%0 : $Purebred):
entry(%0 : @unowned $Purebred):
unreachable
}
sil private @$S18class_isa_pointers7MongrelC7bellsOnACSgSi_tcfcTo : $@convention(objc_method) (Int, Purebred) -> () {
entry(%0 : $Int, %1 : $Purebred):
entry(%0 : @trivial $Int, %1 : @unowned $Purebred):
unreachable
}
sil private @$S18class_isa_pointers7MongrelCACycfcTo : $@convention(objc_method) (Purebred) -> () {
entry(%0 : $Purebred):
entry(%0 : @unowned $Purebred):
unreachable
}
6 changes: 3 additions & 3 deletions test/IRGen/copy_value_destroy_value.sil
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ struct Foo {
// CHECK-NEXT: entry
// CHECK-NEXT: ret void
sil @trivial : $@convention(thin) (Builtin.Int32) -> () {
bb0(%0 : $Builtin.Int32):
bb0(%0 : @trivial $Builtin.Int32):
%1 = copy_value %0 : $Builtin.Int32
destroy_value %1 : $Builtin.Int32
%2 = tuple()
Expand All @@ -37,7 +37,7 @@ bb0(%0 : $Builtin.Int32):
// CHECK: call void @swift_release(%swift.refcounted* [[VAL1]])
// CHECK: call void @swift_release(%swift.refcounted* [[VAL2]])
sil @non_trivial : $@convention(thin) (@guaranteed Foo) -> () {
bb0(%0 : $Foo):
bb0(%0 : @guaranteed $Foo):
%1 = copy_value %0 : $Foo
destroy_value %1 : $Foo
%2 = tuple()
Expand All @@ -48,7 +48,7 @@ bb0(%0 : $Foo):
// CHECK: call %swift.refcounted* @swift_unownedRetainStrong(%swift.refcounted* returned %0)
// CHECK: call void @swift_release(%swift.refcounted* %0)
sil @non_trivial_unowned : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
bb0(%0 : $Builtin.NativeObject):
bb0(%0 : @guaranteed $Builtin.NativeObject):
%1 = ref_to_unowned %0 : $Builtin.NativeObject to $@sil_unowned Builtin.NativeObject
%2 = copy_unowned_value %1 : $@sil_unowned Builtin.NativeObject
destroy_value %2 : $Builtin.NativeObject
Expand Down
4 changes: 2 additions & 2 deletions test/IRGen/enum_32_bit.sil
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %swift -target i386-apple-ios7 %s -gnone -emit-ir | %FileCheck %s
// RUN: %swift -target armv7-apple-ios7 %s -gnone -emit-ir | %FileCheck %s
// RUN: %swift -assume-parsing-unqualified-ownership-sil -target i386-apple-ios7 %s -gnone -emit-ir | %FileCheck %s
// RUN: %swift -assume-parsing-unqualified-ownership-sil -target armv7-apple-ios7 %s -gnone -emit-ir | %FileCheck %s

// REQUIRES: CODEGENERATOR=X86
// REQUIRES: CODEGENERATOR=ARM
Expand Down
4 changes: 2 additions & 2 deletions test/IRGen/enum_spare_bits.sil
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ entry:
return undef : $()
}

sil @$S15enum_spare_bits1DCACycfcTo : $(@owned D) -> @owned D {
entry(%x : $D):
sil @$S15enum_spare_bits1DCACycfcTo : $@convention(thin) (@owned D) -> @owned D {
entry(%x : @owned $D):
return undef : $D
}
2 changes: 1 addition & 1 deletion test/IRGen/exclusivity.sil
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ sil public_external @changeInt : $@convention(thin) (@inout Int) -> ()

// CHECK-LABEL: define {{.*}} @test1(
sil @test1 : $@convention(thin) (@owned A) -> Int {
bb0(%0 : $A):
bb0(%0 : @owned $A):
// CHECK: [[SCRATCH0:%.*]] = alloca [[BUFFER_T:\[.* x i8\]]],
// CHECK: [[SCRATCH1:%.*]] = alloca [[BUFFER_T:\[.* x i8\]]],

Expand Down
10 changes: 5 additions & 5 deletions test/IRGen/generic_classes.sil
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ entry:
// CHECK: define{{( dllexport)?}}{{( protected)?}} swiftcc i8 @RootGeneric_concrete_fragile_dependent_member_access_x
// CHECK: getelementptr inbounds [[ROOTGENERIC]], [[ROOTGENERIC]]* %0, i32 0, i32 1
sil @RootGeneric_concrete_fragile_dependent_member_access_x : $<F> (RootGeneric<F>) -> UInt8 {
entry(%c : $RootGeneric<F>):
entry(%c : @unowned $RootGeneric<F>):
%p = ref_element_addr %c : $RootGeneric<F>, #RootGeneric.x
%x = load_borrow %p : $*UInt8
return %x : $UInt8
Expand All @@ -280,7 +280,7 @@ entry(%c : $RootGeneric<F>):
// CHECK: [[Y_ADDR:%.*]] = getelementptr inbounds i8, i8* [[CLASS_BYTE_ARRAY]], i64 [[Y_OFFSET]]
// CHECK: bitcast i8* [[Y_ADDR]] to %swift.opaque*
sil @RootGeneric_concrete_fragile_dependent_member_access_y : $<F> (RootGeneric<F>) -> @out F {
entry(%z : $*F, %c : $RootGeneric<F>):
entry(%z : @trivial $*F, %c : @unowned $RootGeneric<F>):
%p = ref_element_addr %c : $RootGeneric<F>, #RootGeneric.y
copy_addr %p to [initialization] %z : $*F
%t = tuple ()
Expand All @@ -291,7 +291,7 @@ entry(%z : $*F, %c : $RootGeneric<F>):
// CHECK: [[Y_ADDR:%.*]] = getelementptr inbounds {{.*}}, {{.*}}* %1, i32 0, i32 3
// CHECK: bitcast %TSi* [[Y_ADDR]] to i8*
sil @RootGeneric_subst_concrete_fragile_dependent_member_access_y : $(RootGeneric<Int>) -> @out Int {
entry(%z : $*Int, %c : $RootGeneric<Int>):
entry(%z : @trivial $*Int, %c : @unowned $RootGeneric<Int>):
%p = ref_element_addr %c : $RootGeneric<Int>, #RootGeneric.y
copy_addr %p to [initialization] %z : $*Int
%t = tuple ()
Expand All @@ -307,7 +307,7 @@ entry(%z : $*Int, %c : $RootGeneric<Int>):
// CHECK: [[Z_ADDR:%.*]] = getelementptr inbounds i8, i8* [[CLASS_BYTE_ARRAY]], i64 [[Z_OFFSET]]
// CHECK: bitcast i8* [[Z_ADDR]] to %Ts5UInt8V*
sil @RootGeneric_concrete_fragile_dependent_member_access_z : $<F> (RootGeneric<F>) -> UInt8 {
entry(%c : $RootGeneric<F>):
entry(%c : @unowned $RootGeneric<F>):
%p = ref_element_addr %c : $RootGeneric<F>, #RootGeneric.z
%z = load_borrow %p : $*UInt8
return %z : $UInt8
Expand All @@ -318,7 +318,7 @@ entry(%c : $RootGeneric<F>):
// CHECK: [[T0:%.*]] = getelementptr inbounds %Ts5UInt8V, %Ts5UInt8V* [[Z_ADDR]], i32 0, i32 0
// CHECK: load i8, i8* [[T0]], align
sil @RootGeneric_subst_concrete_fragile_dependent_member_access_z : $(RootGeneric<Int>) -> UInt8 {
entry(%c : $RootGeneric<Int>):
entry(%c : @unowned $RootGeneric<Int>):
%p = ref_element_addr %c : $RootGeneric<Int>, #RootGeneric.z
%z = load_borrow %p : $*UInt8
return %z : $UInt8
Expand Down
12 changes: 6 additions & 6 deletions test/IRGen/generic_classes_objc.sil
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ sil_vtable GenericInheritsObjC {}

// __deallocating_deinit
sil @$S20generic_classes_objc19GenericInheritsObjCCfD : $@convention(method) <T> (GenericInheritsObjC<T>) -> () {
bb0(%0 : $GenericInheritsObjC<T>):
bb0(%0 : @unowned $GenericInheritsObjC<T>):
unreachable
}

// @objc init
sil @$S20generic_classes_objc19GenericInheritsObjCCACyxGycfcTo : $@convention(objc_method) <T> (@owned GenericInheritsObjC<T>) -> @owned GenericInheritsObjC<T> {
bb0(%0 : $GenericInheritsObjC<T>):
bb0(%0 : @owned $GenericInheritsObjC<T>):
unreachable
}

sil @$S20generic_classes_objc19GenericInheritsObjCC7bellsOnACyxGSgSi_tcfcTo : $@convention(objc_method) <T> (Int, @owned GenericInheritsObjC<T>) -> @owned GenericInheritsObjC<T> {
bb0(%0 : $Int, %1 : $GenericInheritsObjC<T>):
bb0(%0 : @trivial $Int, %1 : @owned $GenericInheritsObjC<T>):
unreachable
}

Expand All @@ -50,18 +50,18 @@ sil_vtable GenericInheritsObjC2 {}

// __deallocating_deinit
sil @$S20generic_classes_objc20GenericInheritsObjC2CfD : $@convention(method) <T> (GenericInheritsObjC2<T>) -> () {
bb0(%0 : $GenericInheritsObjC2<T>):
bb0(%0 : @unowned $GenericInheritsObjC2<T>):
unreachable
}

// @objc init
sil @$S20generic_classes_objc20GenericInheritsObjC2CACyxGycfcTo : $@convention(objc_method) <T> (@owned GenericInheritsObjC2<T>) -> @owned GenericInheritsObjC2<T> {
bb0(%0 : $GenericInheritsObjC2<T>):
bb0(%0 : @owned $GenericInheritsObjC2<T>):
unreachable
}

sil @$S20generic_classes_objc20GenericInheritsObjC2C7bellsOnACyxGSgSi_tcfcTo : $@convention(objc_method) <T> (Int, @owned GenericInheritsObjC<T>) -> @owned GenericInheritsObjC<T> {
bb0(%0 : $Int, %1 : $GenericInheritsObjC<T>):
bb0(%0 : @trivial $Int, %1 : @owned $GenericInheritsObjC<T>):
unreachable
}

Expand Down
4 changes: 2 additions & 2 deletions test/IRGen/invariant_load.sil
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s

sil_stage canonical
sil_stage lowered

import Builtin

Expand All @@ -11,7 +11,7 @@ struct X {

// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swiftcc void @invariant_load
sil @invariant_load : $@convention(thin) (Builtin.RawPointer) -> () {
entry(%p : $Builtin.RawPointer):
entry(%p : @trivial $Builtin.RawPointer):
%a = pointer_to_address %p : $Builtin.RawPointer to [invariant] $*X
// CHECK: load i32, {{.*}} !invariant.load
// CHECK: load i32, {{.*}} !invariant.load
Expand Down
4 changes: 2 additions & 2 deletions test/IRGen/keypaths.sil
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ sil @n_get : $@convention(thin) <UU, TT> (@in_guaranteed TT) -> @out UU
sil @n_set : $@convention(thin) <UU, TT> (@in_guaranteed UU, @in_guaranteed TT) -> ()

sil @computed_property_indices : $@convention(thin) (C, S, C, S, C, S) -> () {
entry(%0 : $C, %1 : $S, %2 : $C, %3 : $S, %4 : $C, %5 : $S):
entry(%0 : @unowned $C, %1 : @unowned $S, %2 : @unowned $C, %3 : @unowned $S, %4 : @unowned $C, %5 : @unowned $S):
%o = keypath $WritableKeyPath<S, C>, (
root $S;
settable_property $C,
Expand Down Expand Up @@ -368,7 +368,7 @@ sil @r_get : $@convention(thin) (@in_guaranteed C, UnsafeRawPointer) -> @out S
sil @r_set : $@convention(thin) (@in_guaranteed S, @in_guaranteed C, UnsafeRawPointer) -> ()

sil @generic_computed_property_indices : $@convention(thin) <A: Hashable, B: Hashable> (@in_guaranteed A, @in_guaranteed B, @in_guaranteed A, @in_guaranteed B, @in_guaranteed A, @in_guaranteed B) -> () {
entry(%0 : $*A, %1 : $*B, %2 : $*A, %3 : $*B, %4 : $*A, %5 : $*B):
entry(%0 : @trivial $*A, %1 : @trivial $*B, %2 : @trivial $*A, %3 : @trivial $*B, %4 : @trivial $*A, %5 : @trivial $*B):
%s = keypath $WritableKeyPath<A, B>, <X: Hashable, Y: Hashable> (
root $X;
settable_property $Y,
Expand Down
4 changes: 2 additions & 2 deletions test/IRGen/keypaths_objc.sil
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ entry:
}

sil hidden @$S13keypaths_objc1CC1xSo8NSStringCvgTo : $@convention(objc_method) (@guaranteed C) -> NSString {
entry(%0 : $C):
entry(%0 : @guaranteed $C):
unreachable
}

sil hidden @$S13keypaths_objc1CCACycfcTo : $@convention(objc_method) (@objc_metatype C.Type) -> @owned C {
entry(%0 : $@objc_metatype C.Type):
entry(%0 : @trivial $@objc_metatype C.Type):
unreachable
}

Expand Down
Loading