[cfe-commits] [patch] Don't mark libc++ functions as always_inline in debug mode.

Jeffrey Yasskin jyasskin at gmail.com
Sun Feb 19 19:24:57 PST 2012


Really, even if libc++ is bug-free, it'll confuse users if debugging
it in -O0 mode produces strange line jumps.

If NDEBUG is the wrong macro, would it make sense to provide a
LIBCXX_DEBUG flag to move the inlining decisions to clang?

On Sun, Feb 19, 2012 at 6:57 PM, Howard Hinnant <hhinnant at apple.com> wrote:
> On Feb 19, 2012, at 9:30 PM, Jeffrey Yasskin wrote:
>
>> This patch may not be quite right, since the always_inline macros seem
>> to also have visibility effects, which this patch would block. I also
>> had to build with an explicit -UNDEBUG since cmake appears to add
>> -DNDEBUG regardless of whether the build mode requests it.
>>
>> Jeffrey
>> <no_inline_debug.patch>
>
> I can't commit this one.  The presumption is that NDEBUG is up to the client to turn on and off for his own purposes, and that libc++ does not need to be debugged by him.  I realize that libc++ has bugs.  But the goal is for it to not have bugs, and when it does need to be debugged, a libc++ developer such as myself will do it.
>
> Howard
>




More information about the cfe-commits mailing list