[cfe-dev] [LLVMdev] New libc++ LLVM Subproject

Christopher Jefferson chris at bubblescope.net
Wed May 12 00:00:12 PDT 2010


On 12 May 2010, at 01:07, Howard Hinnant wrote:

> On May 11, 2010, at 7:26 PM, David Greene wrote:
> 
>> On Tuesday 11 May 2010 15:43:21 Chris Lattner wrote:
>>> Hi All,
>>> 
>>> LLVM now includes a C++ standard library, written by Howard Hinnant.  You
>>> can read about it here:
>>> http://blog.llvm.org/2010/05/new-libc-c-standard-library.html
>>> 
>>> Or get the code here:
>>> svn co http://llvm.org/svn/llvm-project/libcxx/trunk libcxx
>>> 
>>> If you have questions or comments, please direct them to one of the clang
>>> mailing lists.  Thanks!
>> 
>> This looks cool, but I can't help wondering about the motivation.  libstdc++
>> has a ton of useful functionality (debug mode, profile mode, etc.).  Does 
>> libc++ plan to reproduce that?
> 
> debug mode yes.  It isn't there yet.  And I would like to limit it to being ABI compatible with release mode.  This will entail significant debug functionality curtailment, but also eliminate numerous errors I've seen when debug mode and release mode get accidentally mixed.

While it would require more work, I believe using 'inline namespaces' would provide the best of both worlds. There can be 2 debugging libraries. One which is ABI-compatable with the standard library while providing as much functionality as possible, and a second which is ABI-incompatable but thanks to being defined in a different namespace and then 'inlined' in std would mangle differently, providing compile-time errors rather than the current run-time errors which often arise from using such a library.

Chris



More information about the cfe-dev mailing list