Is there a way to force an inline function in Clang/LLVM?
AFAIK, the following is just a hint to the compiler but it can ignore the request.
__attribute_
I am going to treat your question as asking for any tools within the Clang/LLVM framework. Here is my suggestion: compile your code to LLVM bitcode and then run the Always inline pass.
For example:
> clang -emit-llvm -c -o foo.bc foo.c
> opt -always-inline foo.bc -o foo_inline.bc
> clang -c -o foo.o foo_inline.bc
I have used this sequence before and it has inlined all of my functions marked "always_inline". In my case, I was already doing other analyses and transforms on the bitcode, so I only had to add the flag to opt.