(original) (raw)

Hi Alan,

On 11/10/2017 11:12 AM, Davis, Alan via llvm-dev wrote:

For whatever reason in this simple example t3 is not being inlined, but I can set that aside for now.

// t2.c:

int t3();


Does inlining happen if you change this to:

int t3(void);

Without the void, it's a non-prototype declaration (a pre-ANSI C holdover) and will get compiled to "declare void t3(...)". I'm guessing you'll see a bitcast at the call site which the inliner can't look through.


Tobias
--   
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,  
a Linux Foundation Collaborative Project.