arsenm accepted this revision. arsenm added a comment. This revision is now accepted and ready to land. LGTM. Ideally we would never get a C calling convention. I think the test should also include a spir_func http://reviews.llvm.org/D13367