File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
lib/Conversion/FuncToEmitC
test/Conversion/FuncToEmitC Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ class CallOpConversion final : public OpConversionPattern<func::CallOp> {
3838
3939 rewriter.replaceOpWithNewOp <emitc::CallOp>(
4040 callOp,
41- callOp.getNumResults () ? callOp.getResult (0 ).getType () : nullptr ,
41+ callOp.getNumResults () ? callOp.getResult (0 ).getType () : TypeRange{} ,
4242 adaptor.getOperands (), callOp->getAttrs ());
4343
4444 return success ();
Original file line number Diff line number Diff line change @@ -58,3 +58,19 @@ func.func @call(%arg0: i32) -> i32 {
5858
5959// CHECK-LABEL: emitc.func private @return_i32(i32) -> i32 attributes {specifiers = ["extern"]}
6060func.func private @return_i32 (%arg0: i32 ) -> i32
61+
62+ // -----
63+
64+ // CHECK-LABEL: emitc.func private @return_void() attributes {specifiers = ["static"]}
65+ // CHECK-NEXT: emitc.return
66+ func.func private @return_void () {
67+ return
68+ }
69+
70+ // CHECK-LABEL: emitc.func @call()
71+ // CHECK-NEXT: emitc.call @return_void() : () -> ()
72+ // CHECK-NEXT: emitc.return
73+ func.func @call () {
74+ call @return_void () : () -> ()
75+ return
76+ }
You can’t perform that action at this time.
0 commit comments