@@ -37,7 +37,7 @@ protocol LateOnoneSimplifyable : Instruction {
3737let ononeSimplificationPass = FunctionPass ( name: " onone-simplification " ) {
3838 ( function: Function , context: FunctionPassContext ) in
3939
40- _ = runSimplification ( on: function, context, preserveDebugInfo: true ) {
40+ runSimplification ( on: function, context, preserveDebugInfo: true ) {
4141 if let i = $0 as? OnoneSimplifyable {
4242 i. simplify ( $1)
4343 }
@@ -47,7 +47,7 @@ let ononeSimplificationPass = FunctionPass(name: "onone-simplification") {
4747let simplificationPass = FunctionPass ( name: " simplification " ) {
4848 ( function: Function , context: FunctionPassContext ) in
4949
50- _ = runSimplification ( on: function, context, preserveDebugInfo: false ) {
50+ runSimplification ( on: function, context, preserveDebugInfo: false ) {
5151 if let i = $0 as? Simplifyable {
5252 i. simplify ( $1)
5353 }
@@ -57,7 +57,7 @@ let simplificationPass = FunctionPass(name: "simplification") {
5757let lateOnoneSimplificationPass = FunctionPass ( name: " late-onone-simplification " ) {
5858 ( function: Function , context: FunctionPassContext ) in
5959
60- _ = runSimplification ( on: function, context, preserveDebugInfo: true ) {
60+ runSimplification ( on: function, context, preserveDebugInfo: true ) {
6161 if let i = $0 as? LateOnoneSimplifyable {
6262 i. simplifyLate ( $1)
6363 } else if let i = $0 as? OnoneSimplifyable {
@@ -70,7 +70,7 @@ let lateOnoneSimplificationPass = FunctionPass(name: "late-onone-simplification"
7070// Pass implementation
7171//===--------------------------------------------------------------------===//
7272
73-
73+ @ discardableResult
7474func runSimplification( on function: Function , _ context: FunctionPassContext ,
7575 preserveDebugInfo: Bool ,
7676 _ simplify: ( Instruction , SimplifyContext ) -> ( ) ) -> Bool {
0 commit comments