[LLVMdev] Conditions that cause Clang refuse inlining a function
David Sela
sela.david at gmail.com
Thu Sep 4 04:42:17 PDT 2014
Hi,
I want to have some functions in my code inline so I use the *inline *
keyword:
*inline void foo() {}*
On some functions the compiler inlines the function but it fails to do so
on other functions and thus I get a linkage error:
*error: undefined reference to 'foo'*
What are the conditions that make the compiler refuse inline?
Thanks,
David
p.s. I know that there are ways to pass compilation and let the compiler
decide if to inline like using *__attribute__((always_inline))* but I must
have the function inline.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140904/789c346f/attachment.html>
More information about the llvm-dev
mailing list