<div dir="ltr"><div>LLVM doesn't have enough information to do it for you. The LLVM type system just isn't as expressive as the C type system, so frontends end up bearing some of the lowering burden.</div><div><br></div>You should consider using clang to do the lowering for you:<div><a href="http://llvm.org/devmtg/2014-10/Slides/Skip%20the%20FFI.pdf">http://llvm.org/devmtg/2014-10/Slides/Skip%20the%20FFI.pdf</a></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 6, 2016 at 4:32 AM, PaweÅ‚ Bylica <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I want to declare a function that matches C ABI. Do I need to transform declarations like void @f(%struct.A %a) into void @f(%struct.A* byval %a) myself or LLVM can do it for me? Is this what "ccc" calling convention means?</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>- PaweÅ‚</div></font></span></div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>