index.html revision e45805f0d3f8dafef1297cc7dc49e610713f023b
15c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" 25c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) "http://www.w3.org/TR/html4/strict.dtd"> 35c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)<!-- Material used from: HTML 4.01 specs: http://www.w3.org/TR/html401/ --> 45c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)<html> 55c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)<head> 65c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> 75c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) <title>"libc++abi" C++ Standard Library Support</title> 85c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) <link type="text/css" rel="stylesheet" href="menu.css"> 95c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) <link type="text/css" rel="stylesheet" href="content.css"> 105c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)</head> 115c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 125c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)<body> 135c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)<div id="menu"> 145c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) <div> 155c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) <a href="http://llvm.org/">LLVM Home</a> 165c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) </div> 175c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 185c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) <div class="submenu"> 195c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) <label>libc++abi Info</label> 205c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) <a href="/index.html">About</a> 215c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) </div> 225c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 235c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) <div class="submenu"> 245c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) <label>Quick Links</label> 255c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">cfe-dev</a> 265c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits">cfe-commits</a> 275c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) <a href="http://llvm.org/bugs/">Bug Reports</a> 285c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) <a href="http://llvm.org/svn/llvm-project/libcxxabi/trunk/">Browse SVN</a> 295c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) <a href="http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/">Browse ViewVC</a> 3053e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) </div> 315c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)</div> 32197021e6b966cfb06891637935ef33fff06433d1Ben Murdoch 33197021e6b966cfb06891637935ef33fff06433d1Ben Murdoch<div id="content"> 34197021e6b966cfb06891637935ef33fff06433d1Ben Murdoch <!--*********************************************************************--> 35197021e6b966cfb06891637935ef33fff06433d1Ben Murdoch <h1>"libc++abi" C++ Standard Library Support</h1> 365d92fedcae5e801a8b224de090094f2d9df0b54aTorne (Richard Coles) <!--*********************************************************************--> 375d92fedcae5e801a8b224de090094f2d9df0b54aTorne (Richard Coles) 387242dc3dbeb210b5e876a3c42d1ec1a667fc621aPrimiano Tucci <p>libc++abi is a new implementation of low level support for a standard 3953e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) C++ library.</p> 4053e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 4153e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) <p>All of the code in libc++abi is <a 4253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) href="http://llvm.org/docs/DeveloperPolicy.html#license">dual licensed</a> 43e52495584422c5edb5b2944981473a2e208da323Torne (Richard Coles) under the MIT license and the UIUC License (a BSD-like license).</p> 44e52495584422c5edb5b2944981473a2e208da323Torne (Richard Coles) 45e52495584422c5edb5b2944981473a2e208da323Torne (Richard Coles) <!--=====================================================================--> 4653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) <h2 id="goals">Features and Goals</h2> 4751b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) <!--=====================================================================--> 481e202183a5dc46166763171984b285173f8585e5Torne (Richard Coles) 491e202183a5dc46166763171984b285173f8585e5Torne (Richard Coles) <ul> 501e202183a5dc46166763171984b285173f8585e5Torne (Richard Coles) <li>Correctness as defined by the C++11 standard.</li> 511e202183a5dc46166763171984b285173f8585e5Torne (Richard Coles) <li>Provide a portable sublayer to ease the porting of <a href="http://libcxx.llvm.org/">libc++</a></li> 521e202183a5dc46166763171984b285173f8585e5Torne (Richard Coles) <li>On Mac OS X, be ABI compatible with the existing low-level support.</li> 5353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) </ul> 54e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) 5509380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) <!--=====================================================================--> 56f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) <h2 id="requirements">Platform Support</h2> 57d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) <!--=====================================================================--> 5809380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) 5953e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) <p>libc++abi is known to work on the following platforms, using clang.</p> 6053e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 619e12abdf8c3a23d52091ea54ebb6a04d327f9300Torne (Richard Coles) <ul> 6253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) <li>Darwin</li> 6353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) </ul> 6453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 657242dc3dbeb210b5e876a3c42d1ec1a667fc621aPrimiano Tucci <!--=====================================================================--> 6606f816c7c76bc45a15e452ade8a34e8af077693eTorne (Richard Coles) <h2 id="dir-structure">Current Status</h2> 677242dc3dbeb210b5e876a3c42d1ec1a667fc621aPrimiano Tucci <!--=====================================================================--> 6806f816c7c76bc45a15e452ade8a34e8af077693eTorne (Richard Coles) 6906f816c7c76bc45a15e452ade8a34e8af077693eTorne (Richard Coles) <p>libc++abi is complete. <a href="spec.html">Here</a> is a 7006f816c7c76bc45a15e452ade8a34e8af077693eTorne (Richard Coles) list of functionality.</p> 7106f816c7c76bc45a15e452ade8a34e8af077693eTorne (Richard Coles) 7253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) <!--=====================================================================--> 73f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) <h2>Get it and get involved!</h2> 7451b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) <!--=====================================================================--> 7551b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) 7653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) <p>To check out the code, use:</p> 7753e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 781e202183a5dc46166763171984b285173f8585e5Torne (Richard Coles) <ul> 791e202183a5dc46166763171984b285173f8585e5Torne (Richard Coles) <li><code>svn co http://llvm.org/svn/llvm-project/libcxxabi/trunk libcxxabi</code></li> 805d92fedcae5e801a8b224de090094f2d9df0b54aTorne (Richard Coles) </ul> 811e202183a5dc46166763171984b285173f8585e5Torne (Richard Coles) 82591b958dee2cf159d33a0b931e6231072eaf38d5Ben Murdoch <p>Send discussions to the 835c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) (<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">clang mailing list</a>).</p> 84c1847b1379d12d0e05df27436bf19a9b1bf12deaTorne (Richard Coles) 855c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) <!--=====================================================================--> 865c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) <h2>Frequently asked questions</h2> 875c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) <!--=====================================================================--> 88323480423219ecd77329f8326dc5e0e3b50926d4Torne (Richard Coles) 89f523d2789ac2f83c4eca0ee4d5161bfdb5f2d052Torne (Richard Coles) <p>Q: Why are the destructors for the standard exception classes defined in libc++abi? 905c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) They're just empty, can't they be defined inline?</p> 91f523d2789ac2f83c4eca0ee4d5161bfdb5f2d052Torne (Richard Coles) <p>A: The destructors for them live in libc++abi because they are "key" functions. 92f523d2789ac2f83c4eca0ee4d5161bfdb5f2d052Torne (Richard Coles) The Itanium ABI describes a "key" function as the first virtual declared. 935c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) And wherever the key function is defined, that is where the <code>type_info</code> gets defined. 945c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) And in libc++ types are the same type if and only if they have the same <code>type_info</code> 955c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) (as in there must be only one type info per type in the entire application). 965c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) And on OS X, libstdc++ and libc++ share these exception types. 975c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) So to be able to throw in one dylib and catch in another (a <code>std::exception</code> for example), 98f523d2789ac2f83c4eca0ee4d5161bfdb5f2d052Torne (Richard Coles) there must be only one <code>std::exception type_info</code> in the entire app. 995c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) That typeinfo gets laid down beside <code>~exception()</code> in libc++abi (for both libstdc++ and libc++).</p> 1005c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) <p>--Howard Hinnant</p> 1015c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 1025c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)</div> 1035c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)</body> 1045c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)</html> 105f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles)