blob: 343e9b4a4296f419db8933b90980e89c707f1def [file] [log] [blame]
Kevin8e8f64e2007-10-06 21:28:47 +00001<!-- Material used from: HTML 4.01 specs: http://www.w3.org/TR/html401/ -->
Chris Lattner29754e62007-12-09 08:17:09 +00002<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
3 "http://www.w3.org/TR/html4/strict.dtd">
Kevin8e8f64e2007-10-06 21:28:47 +00004<html>
5<head>
Chris Lattner29754e62007-12-09 08:17:09 +00006 <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" />
Kevin8e8f64e2007-10-06 21:28:47 +000010</head>
11<body>
Chris Lattner29754e62007-12-09 08:17:09 +000012 <!--#include virtual="menu.html.incl"-->
13 <div id="content">
Chris Lattner29754e62007-12-09 08:17:09 +000014 <h1>clang: a C language family frontend for LLVM</h1>
15
Chris Lattner5ea74932007-12-09 09:05:23 +000016 <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 Lattner1c057262007-12-09 08:38:01 +000019
Chris Lattner29754e62007-12-09 08:17:09 +000020 <h2>Why?</h2>
Chris Lattner5ea74932007-12-09 09:05:23 +000021
22 <p>The development of a new front-end was started out of a need -- a need
23 for a compiler that allows better diagnostics, better integration with
24 IDEs, a license that is compatible with commercial products, and a
25 compiler that is easier to develop and maintain. All of these were
26 motivations for starting work on a new front-end that could
27 meet these needs.</p>
28
Chris Lattner65b3c272007-12-09 17:50:14 +000029 <p>A good (but quite dated) introduction to Clang can be found in the
Chris Lattner5ea74932007-12-09 09:05:23 +000030 following video lectures:</p>
31
Chris Lattner29754e62007-12-09 08:17:09 +000032 <ul>
33 <li><a href="clang_video-05-25-2007.html">Clang Introduction</a>
Chris Lattner5ea74932007-12-09 09:05:23 +000034 (May 2007)</li>
35 <li><a href="clang_video-07-25-2007.html">Features and Performance of
36 Clang</a> (July 2007)</li>
Chris Lattner29754e62007-12-09 08:17:09 +000037 </ul>
Chris Lattner5ea74932007-12-09 09:05:23 +000038
Chris Lattner2d8e3562007-12-10 02:25:51 +000039 <p>For a more detailed comparison about Clang and other compilers, please
40 see the <a href="comparison.html">clang comparison page</a>.</p>
41
Chris Lattner29754e62007-12-09 08:17:09 +000042 <h2>Features/Goals</h2>
Chris Lattner5ea74932007-12-09 09:05:23 +000043
44 <p>Some of the goals for the project include the following:</p>
45
Chris Lattner29754e62007-12-09 08:17:09 +000046 <ul>
Chris Lattner5ea74932007-12-09 09:05:23 +000047 <li>Real-world, production quality compiler.</li>
48 <li>A single unified parser for C, Objective C, C++, and Objective
49 C++.</li>
50 <li>Language conformance with these languages and their variants, like
51 C90, C99, etc.</li>
52 <li>GCC compatibility: support GCC extensions, but allow them to be
53 disabled.</li>
54 <li>Library based architecture with finely crafted APIs.</li>
55 <li>Support many clients, such as refactoring, static analysis, as well as
56 code generation.</li>
57 <li>High performance.</li>
58 <li>Design for integration with IDEs as well as code generation with the
59 <a href="http://llvm.org">LLVM Optimizer and Code Generator</a>.</li>
60 <li><a href="features.html#expressivediags">Expressive diagnostics</a>:
61 warnings and errors that are actually helpful and make sense.</li>
62 <li>Use the LLVM <a
63 href="http://llvm.org/svn/llvm-project/cfe/trunk/LICENSE.TXT">'BSD'
64 License</a>.</li>
Chris Lattner29754e62007-12-09 08:17:09 +000065 </ul>
Chris Lattner5ea74932007-12-09 09:05:23 +000066
67 <p>Of course this is only a rough outline of the goals and features of
68 Clang. To get a true sense of what the new LLVM front-end is all about,
69 as well as why you might want to considering using it, see the <a
70 href="features.html">Features</a> section.</p>
71
72
73 <h2>Current Status</h2>
74
75 <p>Clang is still in early development stages. If you are looking for
76 source analysis or source-to-source transformation tools, clang is probably
77 a great solution for you. If you want to use it as a drop in C compiler, it
78 is not yet ready.</p>
79
80 <p>Clang currently has pretty good parsing and semantic analysis support for
81 C and Objective-C right now, and bugs are usually quickly fixed once
82 reported. C++ support is still very early, and we don't expect to have
83 respectable C++ support for another 2 years or so.</p>
84
Chris Lattner29754e62007-12-09 08:17:09 +000085 <h2>Get Involved</h2>
Chris Lattner5ea74932007-12-09 09:05:23 +000086
87 <p>The developers of Clang include contributers from Apple and numerous
88 other volunteers. If you are interested in joining the community or
89 learning more, please consider joining the <a
90 href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">cfe-dev</a>
91 mailing list, or start by browsing its archives.</p>
92
93 <p>If you are interested in trying out Clang, please see the build
94 instructions on the <ahref="get_involved.html#build">Get Involved</a>
95 page.</p>
Chris Lattner29754e62007-12-09 08:17:09 +000096 </div>
Kevin8e8f64e2007-10-06 21:28:47 +000097</body>
Chris Lattner5ea74932007-12-09 09:05:23 +000098</html>