13d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" 23d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet "http://www.w3.org/TR/html4/strict.dtd"> 33d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet<!-- Material used from: HTML 4.01 specs: http://www.w3.org/TR/html401/ --> 43d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet<html> 53d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet<head> 670f2a0485dd81e6684553eb5537a27db4176ed45Gabor Greif <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> 73d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <title>"clang" C Language Family Frontend for LLVM</title> 870f2a0485dd81e6684553eb5537a27db4176ed45Gabor Greif <link type="text/css" rel="stylesheet" href="menu.css"> 970f2a0485dd81e6684553eb5537a27db4176ed45Gabor Greif <link type="text/css" rel="stylesheet" href="content.css"> 103d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet</head> 113d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet<body> 123d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet<!--#include virtual="menu.html.incl"--> 133d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet<div id="content"> 143d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <!--*********************************************************************--> 153d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <h1>clang: a C language family frontend for LLVM</h1> 163d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <!--*********************************************************************--> 173d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet 183d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <p>The goal of the Clang project is to create a new C, C++, Objective C and 193d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet Objective C++ front-end for the <a href="http://www.llvm.org/">LLVM</a> 203d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet compiler. You can <a href="get_started.html">get and build</a> the source 213d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet today.</p> 223d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet 233d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <!--=====================================================================--> 243d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <h2 id="goals">Features and Goals</h2> 253d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <!--=====================================================================--> 263d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet 273d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <p>Some of the goals for the project include the following:</p> 283d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet 293d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <p><b><a href="features.html#enduser">End-User Features</a></b>:</p> 303d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet 313d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <ul> 323d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <li>Fast compiles and low memory use</li> 33cec8e775895fadfc324fe97a90b3c9601f86491cChris Lattner <li>Expressive diagnostics (<a href="diagnostics.html">examples</a>)</li> 343d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <li>GCC compatibility</li> 353d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet </ul> 363d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet 373d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <p><b><a href="features.html#applications">Utility and 383d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet Applications</a></b>:</p> 393d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet 403d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <ul> 413d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <li>Modular library based architecture</li> 423d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <li>Support diverse clients (refactoring, static analysis, code generation, 43651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines etc.)</li> 443d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <li>Allow tight integration with IDEs</li> 453d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <li>Use the LLVM 'BSD' License</li> 463d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet </ul> 473d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet 483d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <p><b><a href="features.html#design">Internal Design and 493d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet Implementation</a></b>:</p> 503d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet 513d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <ul> 523d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <li>A real-world, production quality compiler</li> 533d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <li>A simple and hackable code base</li> 543d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <li>A single unified parser for C, Objective C, C++, and Objective C++</li> 553d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <li>Conformance with C/C++/ObjC and their variants</li> 563d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet </ul> 573d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet 583d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <p>Of course this is only a rough outline of the goals and features of 593d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet Clang. To get a true sense of what it is all about, see the <a 603d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet href="features.html">Features</a> section, which breaks 613d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet each of these down and explains them in more detail.</p> 623d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet 633d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet 643d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <!--=====================================================================--> 653d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <h2>Why?</h2> 663d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <!--=====================================================================--> 673d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet 68651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines <p>Development of the new front-end was started out of a need 693d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet for a compiler that allows better diagnostics, better integration with 703d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet IDEs, a license that is compatible with commercial products, and a 713d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet nimble compiler that is easy to develop and maintain. All of these were 723d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet motivations for starting work on a new front-end that could 733d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet meet these needs.</p> 743d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet 753d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <p>A good (but quite dated) introduction to Clang can be found in the 763d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet following video lectures:</p> 773d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet 783d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <ul> 793d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <li><a href="clang_video-05-25-2007.html">Clang Introduction</a> 803d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet (May 2007)</li> 813d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <li><a href="clang_video-07-25-2007.html">Features and Performance of 823d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet Clang</a> (July 2007)</li> 833d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet </ul> 843d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet 853d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <p>For a more detailed comparison between Clang and other compilers, please 863d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet see the <a href="comparison.html">clang comparison page</a>.</p> 873d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet 883d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <!--=====================================================================--> 893d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <h2>Current Status</h2> 903d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <!--=====================================================================--> 913d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet 92651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines <p>Clang is considered to 9300406d0ab613f1ce1fa1b664c0fd21b8d898f44dChris Lattner be a production quality C, Objective-C, C++ and Objective-C++ compiler when 9400406d0ab613f1ce1fa1b664c0fd21b8d898f44dChris Lattner targeting X86-32, X86-64, and ARM (other targets may have caveats, but are 9500406d0ab613f1ce1fa1b664c0fd21b8d898f44dChris Lattner usually easy to fix). If you are looking for source analysis or 9657f1a00bf28e32a10414bb383e1cfc8dce3f0462Douglas Gregor source-to-source transformation tools, clang is probably a great 97e6e68b53778bb5a15c10a73a5bf18d8ab73f75e3Richard Smith solution for you. Clang supports C++11, please see the <a 9857f1a00bf28e32a10414bb383e1cfc8dce3f0462Douglas Gregor href="cxx_status.html">C++ status</a> page for more 9957f1a00bf28e32a10414bb383e1cfc8dce3f0462Douglas Gregor information.</p> 1003d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet 1013d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <!--=====================================================================--> 1023d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <h2>Get it and get involved!</h2> 1033d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <!--=====================================================================--> 1043d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet 1053d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <p>Start by <a href="get_started.html">getting the code, building it, and 1063d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet playing with it</a>. This will show you the sorts of things we can do 1073d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet today and will let you have the "clang experience" first hand: hopefully 1083d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet it will "resonate" with you. :)</p> 1093d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet 1103d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet <p>Once you've done that, please consider <a href="get_involved.html">getting 1113d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet involved in the clang community</a>. The clang developers include numerous 1123d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet volunteer contributors with a variety of backgrounds. If you're 1133d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet interested in 1143d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet following the development of clang, signing up for a mailing list is a good 1153d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet way to learn about how the project works.</p> 1163d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet</div> 1173d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet</body> 1183d658640abc128dcc84a5a5201456395c86c4fa6Cedric Venet</html> 119