via llvm-dev
2021-Sep-22 14:00 UTC
[llvm-dev] Disabling inline compilation (Clang with VS2019)
> I'm not quite sure what the difference is between LLVM and Clang so > sorry if I'm getting them mixed up - but is there a possible fix by just > extending the implementation for your "/Ob0" handler? In other words, > if "/Ob0" gets specified during compilation, the compiler would stop > trying to inline things?It looks like the driver does translate "/Ob0" to the internal option "-fno-inline" which ought to prevent inlining of anything that is not marked as always-inline; I am pretty sure that simply being defined in-class does not qualify. I tried your example on my machine locally (adding a function that calls get_keyboard) and it did not inline the call. I don't know why this result differs from Eric's. --paulr
John Emmas via llvm-dev
2021-Sep-22 14:13 UTC
[llvm-dev] Disabling inline compilation (Clang with VS2019)
On 22/09/2021 15:00, paul.robinson at sony.com wrote:> It looks like the driver does translate "/Ob0" to the internal option > "-fno-inline" which ought to prevent inlining of anything that is not > marked as always-inline; >Thanks Paul - does Clang produce some log file that'd tell me what command got received from Visual Studio? VS tells me that it's sending "/Ob0" but if it's working for you, it'd be nice to check here if "/Ob0" actually got received. I've known things to stop working occasionally in new VS revisions. John