File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed
SwiftCompilerSources/Sources/Optimizer Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -506,14 +506,6 @@ private extension AllocRefInstBase {
506
506
}
507
507
}
508
508
509
- private extension FunctionPassContext {
510
- func erase( instructions: [ Instruction ] ) {
511
- for inst in instructions {
512
- erase ( instruction: inst)
513
- }
514
- }
515
- }
516
-
517
509
private func optimizeFindStringCall( stringArray: GlobalValueInst , _ context: FunctionPassContext ) {
518
510
if stringArray. numArrayElements > 16 ,
519
511
let findStringCall = findFindStringCall ( stringArray: stringArray) ,
Original file line number Diff line number Diff line change @@ -153,6 +153,12 @@ extension MutatingContext {
153
153
erase ( instruction: inst)
154
154
}
155
155
156
+ func erase< S: Sequence > ( instructions: S ) where S. Element: Instruction {
157
+ for inst in instructions {
158
+ erase ( instruction: inst)
159
+ }
160
+ }
161
+
156
162
func erase( instructionIncludingDebugUses inst: Instruction ) {
157
163
precondition ( inst. results. allSatisfy { $0. uses. ignoreDebugUses. isEmpty } )
158
164
erase ( instructionIncludingAllUsers: inst)
You can’t perform that action at this time.
0 commit comments