mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Performance annotations: add attributes @_noLocks and @_noAllocation
This commit is contained in:
@@ -6,6 +6,20 @@ bb0:
|
||||
return undef : $()
|
||||
}
|
||||
|
||||
// CHECK-LABEL: sil [no_allocation] [ossa] @test_no_allocation : $@convention(thin) () -> () {
|
||||
sil [no_allocation] [ossa] @test_no_allocation : $@convention(thin) () -> () {
|
||||
bb0:
|
||||
%1 = tuple ()
|
||||
return %1 : $()
|
||||
}
|
||||
|
||||
// CHECK-LABEL: sil [no_locks] [ossa] @test_no_locks : $@convention(thin) () -> () {
|
||||
sil [no_locks] [ossa] @test_no_locks : $@convention(thin) () -> () {
|
||||
bb0:
|
||||
%1 = tuple ()
|
||||
return %1 : $()
|
||||
}
|
||||
|
||||
// Make sure we don't try to parse the Swift decl as '@owned() func baz()'.
|
||||
sil @bar : $@convention(thin) () -> @owned ()
|
||||
func baz()
|
||||
|
||||
Reference in New Issue
Block a user