Kevin | 8e8f64e | 2007-10-06 21:28:47 +0000 | [diff] [blame] | 1 | <!-- Material used from: HTML 4.01 specs: http://www.w3.org/TR/html401/ -->
|
Chris Lattner | 29754e6 | 2007-12-09 08:17:09 +0000 | [diff] [blame] | 2 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
| 3 | "http://www.w3.org/TR/html4/strict.dtd">
|
Kevin | 8e8f64e | 2007-10-06 21:28:47 +0000 | [diff] [blame] | 4 | <html>
|
| 5 | <head>
|
Chris Lattner | 29754e6 | 2007-12-09 08:17:09 +0000 | [diff] [blame] | 6 | <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
| 7 | <title>"clang" C Language Family Frontend for LLVM</title>
|
| 8 | <link type="text/css" rel="stylesheet" href="menu.css" />
|
| 9 | <link type="text/css" rel="stylesheet" href="content.css" />
|
Kevin | 8e8f64e | 2007-10-06 21:28:47 +0000 | [diff] [blame] | 10 | </head>
|
| 11 | <body>
|
Chris Lattner | 29754e6 | 2007-12-09 08:17:09 +0000 | [diff] [blame] | 12 | <!--#include virtual="menu.html.incl"-->
|
| 13 | <div id="content">
|
Chris Lattner | 29754e6 | 2007-12-09 08:17:09 +0000 | [diff] [blame] | 14 | <h1>clang: a C language family frontend for LLVM</h1>
|
| 15 |
|
Chris Lattner | 5ea7493 | 2007-12-09 09:05:23 +0000 | [diff] [blame] | 16 | <p>The goal of the Clang project is to create a new C, C++, Objective C and
|
| 17 | Objective C++ front-end for the <a href="http://www.llvm.org/">LLVM</a>
|
| 18 | compiler.</p>
|
Chris Lattner | 1c05726 | 2007-12-09 08:38:01 +0000 | [diff] [blame] | 19 |
|
Chris Lattner | 6908f30 | 2007-12-10 05:52:05 +0000 | [diff] [blame] | 20 | <h2><a name="goals">Features and Goals</a></h2>
|
Chris Lattner | 48b7de6 | 2007-12-10 05:10:14 +0000 | [diff] [blame] | 21 |
|
| 22 | <p>Some of the goals for the project include the following:</p>
|
| 23 |
|
| 24 | <ul>
|
| 25 | <li>Real-world, production quality compiler.</li>
|
| 26 | <li>A single unified parser for C, Objective C, C++, and Objective
|
| 27 | C++.</li>
|
| 28 | <li>Language conformance with these languages and their variants, like
|
| 29 | C90, C99, etc.</li>
|
| 30 | <li>GCC compatibility: support GCC extensions, but allow them to be
|
| 31 | disabled.</li>
|
| 32 | <li><a href="features.html#performance">High performance and low memory
|
| 33 | use</a>.</li>
|
Chris Lattner | 48b7de6 | 2007-12-10 05:10:14 +0000 | [diff] [blame] | 34 | <li>Support many clients such as refactoring, static analysis, as well as
|
| 35 | code generation.</li>
|
Chris Lattner | ce90ba6 | 2007-12-10 05:20:47 +0000 | [diff] [blame] | 36 | <li>Build a library-based architecture with finely crafted APIs, allowing
|
| 37 | the code to be reused in many ways.</li>
|
Chris Lattner | 48b7de6 | 2007-12-10 05:10:14 +0000 | [diff] [blame] | 38 | <li>Design for integration with IDEs as well as code generation with the
|
| 39 | <a href="http://llvm.org">LLVM Optimizer and Code Generator</a>.</li>
|
| 40 | <li><a href="features.html#expressivediags">Expressive diagnostics</a>:
|
| 41 | warnings and errors that are actually helpful and make sense.</li>
|
| 42 | <li>Use the LLVM <a
|
| 43 | href="http://llvm.org/svn/llvm-project/cfe/trunk/LICENSE.TXT">'BSD'
|
| 44 | License</a>.</li>
|
Chris Lattner | ce90ba6 | 2007-12-10 05:20:47 +0000 | [diff] [blame] | 45 | <li>Finally, make the code clean and simple enough to make it understandable
|
| 46 | to anyone who knows the languages involved and has a basic idea of
|
| 47 | compilers work.</li>
|
Chris Lattner | 48b7de6 | 2007-12-10 05:10:14 +0000 | [diff] [blame] | 48 | </ul>
|
| 49 |
|
| 50 | <p>Of course this is only a rough outline of the goals and features of
|
Chris Lattner | 1a380a0 | 2007-12-10 07:14:08 +0000 | [diff] [blame] | 51 | Clang. To get a true sense of what it is all about, see the <a
|
| 52 | href="features.html">Features</a> section. The Features section breaks
|
| 53 | each of these down and explains them in more detail.</p>
|
Chris Lattner | 48b7de6 | 2007-12-10 05:10:14 +0000 | [diff] [blame] | 54 |
|
| 55 |
|
| 56 | <h2>Why?</h2>
|
Chris Lattner | 5ea7493 | 2007-12-09 09:05:23 +0000 | [diff] [blame] | 57 |
|
| 58 | <p>The development of a new front-end was started out of a need -- a need
|
| 59 | for a compiler that allows better diagnostics, better integration with
|
| 60 | IDEs, a license that is compatible with commercial products, and a
|
Chris Lattner | 1a380a0 | 2007-12-10 07:14:08 +0000 | [diff] [blame] | 61 | nimble compiler that is easy to develop and maintain. All of these were
|
Chris Lattner | 5ea7493 | 2007-12-09 09:05:23 +0000 | [diff] [blame] | 62 | motivations for starting work on a new front-end that could
|
| 63 | meet these needs.</p>
|
| 64 |
|
Chris Lattner | 65b3c27 | 2007-12-09 17:50:14 +0000 | [diff] [blame] | 65 | <p>A good (but quite dated) introduction to Clang can be found in the
|
Chris Lattner | 5ea7493 | 2007-12-09 09:05:23 +0000 | [diff] [blame] | 66 | following video lectures:</p>
|
| 67 |
|
Chris Lattner | 29754e6 | 2007-12-09 08:17:09 +0000 | [diff] [blame] | 68 | <ul>
|
| 69 | <li><a href="clang_video-05-25-2007.html">Clang Introduction</a>
|
Chris Lattner | 5ea7493 | 2007-12-09 09:05:23 +0000 | [diff] [blame] | 70 | (May 2007)</li>
|
| 71 | <li><a href="clang_video-07-25-2007.html">Features and Performance of
|
| 72 | Clang</a> (July 2007)</li>
|
Chris Lattner | 29754e6 | 2007-12-09 08:17:09 +0000 | [diff] [blame] | 73 | </ul>
|
Chris Lattner | 5ea7493 | 2007-12-09 09:05:23 +0000 | [diff] [blame] | 74 |
|
Chris Lattner | 48b7de6 | 2007-12-10 05:10:14 +0000 | [diff] [blame] | 75 | <p>For a more detailed comparison between Clang and other compilers, please
|
Chris Lattner | 2d8e356 | 2007-12-10 02:25:51 +0000 | [diff] [blame] | 76 | see the <a href="comparison.html">clang comparison page</a>.</p>
|
| 77 |
|
Chris Lattner | 48b7de6 | 2007-12-10 05:10:14 +0000 | [diff] [blame] | 78 | <h2>Current Status</h2>
|
Chris Lattner | 5ea7493 | 2007-12-09 09:05:23 +0000 | [diff] [blame] | 79 |
|
| 80 | <p>Clang is still in early development stages. If you are looking for
|
| 81 | source analysis or source-to-source transformation tools, clang is probably
|
| 82 | a great solution for you. If you want to use it as a drop in C compiler, it
|
| 83 | is not yet ready.</p>
|
| 84 |
|
| 85 | <p>Clang currently has pretty good parsing and semantic analysis support for
|
| 86 | C and Objective-C right now, and bugs are usually quickly fixed once
|
| 87 | reported. C++ support is still very early, and we don't expect to have
|
| 88 | respectable C++ support for another 2 years or so.</p>
|
| 89 |
|
Chris Lattner | 29754e6 | 2007-12-09 08:17:09 +0000 | [diff] [blame] | 90 | <h2>Get Involved</h2>
|
Chris Lattner | 5ea7493 | 2007-12-09 09:05:23 +0000 | [diff] [blame] | 91 |
|
| 92 | <p>The developers of Clang include contributers from Apple and numerous
|
| 93 | other volunteers. If you are interested in joining the community or
|
| 94 | learning more, please consider joining the <a
|
| 95 | href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">cfe-dev</a>
|
| 96 | mailing list, or start by browsing its archives.</p>
|
| 97 |
|
| 98 | <p>If you are interested in trying out Clang, please see the build
|
Chris Lattner | 48b7de6 | 2007-12-10 05:10:14 +0000 | [diff] [blame] | 99 | instructions on the <a href="get_involved.html#build">Get Involved</a>
|
Chris Lattner | 5ea7493 | 2007-12-09 09:05:23 +0000 | [diff] [blame] | 100 | page.</p>
|
Chris Lattner | 29754e6 | 2007-12-09 08:17:09 +0000 | [diff] [blame] | 101 | </div>
|
Kevin | 8e8f64e | 2007-10-06 21:28:47 +0000 | [diff] [blame] | 102 | </body>
|
Chris Lattner | 5ea7493 | 2007-12-09 09:05:23 +0000 | [diff] [blame] | 103 | </html>
|