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 {
506506 }
507507}
508508
509- private extension FunctionPassContext {
510- func erase( instructions: [ Instruction ] ) {
511- for inst in instructions {
512- erase ( instruction: inst)
513- }
514- }
515- }
516-
517509private func optimizeFindStringCall( stringArray: GlobalValueInst , _ context: FunctionPassContext ) {
518510 if stringArray. numArrayElements > 16 ,
519511 let findStringCall = findFindStringCall ( stringArray: stringArray) ,
Original file line number Diff line number Diff line change @@ -153,6 +153,12 @@ extension MutatingContext {
153153 erase ( instruction: inst)
154154 }
155155
156+ func erase< S: Sequence > ( instructions: S ) where S. Element: Instruction {
157+ for inst in instructions {
158+ erase ( instruction: inst)
159+ }
160+ }
161+
156162 func erase( instructionIncludingDebugUses inst: Instruction ) {
157163 precondition ( inst. results. allSatisfy { $0. uses. ignoreDebugUses. isEmpty } )
158164 erase ( instructionIncludingAllUsers: inst)
You can’t perform that action at this time.
0 commit comments