<div dir="ltr">Hello,<div><br></div><div>How can I inline a function mentioned in other file?</div><div><br></div><div>I have an inline function <i>foo</i> in C source file (a.c) which is not referenced in this file. I compile this file to a.ll (I notice that the compiled a.ll doesn't have <i>foo</i>'s definition, probably because it was inlined but not called anywhere)</div><div>I have another C source file b.c with function <i>bar</i>; I compile this to b.ll</div><div>I link these two files with llvm-link</div><div>I have written a pass which inserts <i>foo </i>function calls to the bar function at some points. I want foo function calls to be <i>inlined</i>. However, I get  compilation error because <i>foo </i>is not found (a.ll doesn't have foo)</div><div>If I remove the inline attribute of foo in a.c, I get the correctly compilation, with calls to foo inserted in bar from b.c</div><div>How do I achieve this kind of inline-ing?</div><div><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Regards,<div>Soham Sinha</div><div>PhD Student, Department of Computer Science</div><div>Boston University</div></div></div></div></div></div></div></div>
</div></div>