AACStringGetLength()
can be inlined into its callers assuming the other requirements of inlining are satisfied. There's nothing about calls to Objective-C methods that prevents inlining of C functions.
Of course Objective-C methods cannot be inlined themselves, because the compiler cannot know that there is no unusual dynamic dispatch going on.
Things that can prevent inlining include:
- the caller and callee are in different translation units (i.e. different source code files), unless you are using link-time optimization of some sort
- the caller's code might end up "too big" after inlining according to the compiler's inlining heuristics
- the callee performs control flow that is too complicated for the compiler's inlining machinery to handle so it gives up