Skip to content

What is the smallest MIR output that I can create using the c api? #336

Answered by vnmakarov
rishavs asked this question in Q&A
Discussion options

You must be logged in to vote

You can use int main () {return 0;} and compile it by c2m with option -S. It will produce .mir file you can use for your purposes:

M0:     module
main:   func    i32

# 0 args, 0 locals, 0 globals
	ret     0
	endfunc
	export  main
	endmodule

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by rishavs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants