[PATCH] D25624: Added 'inline' attribute to basic_string's destructor

Mehdi AMINI via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 31 15:42:59 PDT 2016

mehdi_amini added a comment.

In https://reviews.llvm.org/D25624#583883, @sebpop wrote:

> In https://reviews.llvm.org/D25624#583163, @mehdi_amini wrote:
> > I'd like to understand why only the destructor?
> We have committed a patch to inline the constructor of std::string.
>  Do you think we should inline some other functions?

I'd say all of them (unless there's a reason to not do) :)
So: default to the inline keyword, with possibility of opt-out on a case by case.

The only impact of the inline attribute, as I understand, is to make sure some IR is emitted. There won't be any codegen, and the compile-time impact should be reasonnable.


More information about the cfe-commits mailing list