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

Chris Lattner clattner at apple.com
Mon Feb 20 04:58:01 PST 2012


Why are these functions marked always-inline in the first place?

-Chris

On Feb 19, 2012, at 7:24 PM, Jeffrey Yasskin <jyasskin at gmail.com> wrote:

> 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
>> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits



More information about the cfe-commits mailing list