philnik777 wrote:

> This doesn't seem all that useful/important to me - a user can move the body 
> of the function into an implementation unit rather than putting it in the 
> interface unit and marking it noinline, right? This is the same 
> recommendation we'd make if someone wrote a complex function definition in a 
> header - and I think it's fine that the advice remains valid/relevant even in 
> a modules build.

I think this makes a lot of sense for things like `string`, which requires all 
function definitions to be available for `constexpr` and template reasons, but 
we want to mark some functions as `noinline` for better optimizations. We 
haven't done that yet in libc++, but we'll have to at some point to address 
some regressions from making `string` `constexpr` in C++20.

https://github.com/llvm/llvm-project/pull/68501
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to