This repository was archived by the owner on Jan 10, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ func _deallocateUninitializedArray<Element>(
64
64
array. _deallocateUninitialized ( )
65
65
}
66
66
67
+ #if !INTERNAL_CHECKS_ENABLED
67
68
@_alwaysEmitIntoClient
68
69
@_semantics ( " array.finalize_intrinsic " )
69
70
@_effects ( readnone)
@@ -75,6 +76,20 @@ func _finalizeUninitializedArray<Element>(
75
76
mutableArray. _endMutation ( )
76
77
return mutableArray
77
78
}
79
+ #else
80
+ // When asserts are enabled, _endCOWMutation writes to _native.isImmutable
81
+ // So we cannot have @_effects(readnone)
82
+ @_alwaysEmitIntoClient
83
+ @_semantics ( " array.finalize_intrinsic " )
84
+ public // COMPILER_INTRINSIC
85
+ func _finalizeUninitializedArray< Element> (
86
+ _ array: __owned Array< Element >
87
+ ) -> Array < Element > {
88
+ var mutableArray = array
89
+ mutableArray. _endMutation ( )
90
+ return mutableArray
91
+ }
92
+ #endif
78
93
79
94
extension Collection {
80
95
// Utility method for collections that wish to implement
Original file line number Diff line number Diff line change 3
3
// RUN: %empty-directory(%t)
4
4
// RUN: %target-swiftc_driver -wmo -O -Xllvm -sil-disable-pass=FunctionSignatureOpts -emit-sil -save-optimization-record=yaml -save-optimization-record-path %t/note.yaml %s -o /dev/null && %FileCheck --input-file=%t/note.yaml %s
5
5
6
+ // REQUIRES: optimized_stdlib,swift_stdlib_no_asserts
7
+
6
8
// This file is testing out the basic YAML functionality to make sure that it
7
9
// works without burdening opt-remark-generator-yaml.swift with having to update all
8
10
// of the yaml test cases everytime new code is added.
Original file line number Diff line number Diff line change 1
1
// RUN: %target-swiftc_driver -O -Rpass-missed=sil-opt-remark-gen -Xllvm -sil-disable-pass=FunctionSignatureOpts -emit-sil %s -o /dev/null -Xfrontend -verify
2
- // REQUIRES: optimized_stdlib
2
+ // REQUIRES: optimized_stdlib,swift_stdlib_no_asserts
3
3
4
4
// XFAIL: OS=linux-androideabi && CPU=armv7
5
5
You can’t perform that action at this time.
0 commit comments