blob: 1ca24973a1d31ed1b5f611fcb3021e6b7add7ff0 [file] [log] [blame]
Sylvestre Ledru29e2a582017-08-25 08:44:56 +00001<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
Cedric Venet084381332009-02-14 20:20:19 +00002 "http://www.w3.org/TR/html4/strict.dtd">
3<!-- Material used from: HTML 4.01 specs: http://www.w3.org/TR/html401/ -->
4<html>
5<head>
Gabor Greifdd4ddf12009-02-25 15:22:45 +00006 <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
Richard Smithd9d42f92018-03-01 22:01:06 +00007 <title>Clang C Language Family Frontend for LLVM</title>
Gabor Greifdd4ddf12009-02-25 15:22:45 +00008 <link type="text/css" rel="stylesheet" href="menu.css">
9 <link type="text/css" rel="stylesheet" href="content.css">
Cedric Venet084381332009-02-14 20:20:19 +000010</head>
11<body>
12<!--#include virtual="menu.html.incl"-->
13<div id="content">
14 <!--*********************************************************************-->
Richard Smithd9d42f92018-03-01 22:01:06 +000015 <h1>Clang: a C language family frontend for LLVM</h1>
Cedric Venet084381332009-02-14 20:20:19 +000016 <!--*********************************************************************-->
Sylvestre Ledru29e2a582017-08-25 08:44:56 +000017
Richard Smithd9d42f92018-03-01 22:01:06 +000018 <p>The Clang project provides a language front-end and tooling infrastructure
19 for languages in the C language family (C, C++, Objective C/C++, OpenCL,
20 CUDA, and RenderScript) for the <a href="http://www.llvm.org/">LLVM</a>
21 project. Both a GCC-compatible compiler driver (<tt>clang</tt>) and an
22 MSVC-compatible compiler driver (<tt>clang-cl.exe</tt>) are provided. You
23 can <a href="get_started.html">get and build</a> the source today.</p>
Sylvestre Ledru29e2a582017-08-25 08:44:56 +000024
Cedric Venet084381332009-02-14 20:20:19 +000025 <!--=====================================================================-->
26 <h2 id="goals">Features and Goals</h2>
27 <!--=====================================================================-->
Sylvestre Ledru29e2a582017-08-25 08:44:56 +000028
Cedric Venet084381332009-02-14 20:20:19 +000029 <p>Some of the goals for the project include the following:</p>
Sylvestre Ledru29e2a582017-08-25 08:44:56 +000030
Cedric Venet084381332009-02-14 20:20:19 +000031 <p><b><a href="features.html#enduser">End-User Features</a></b>:</p>
32
33 <ul>
34 <li>Fast compiles and low memory use</li>
Chris Lattner8fda6742009-03-19 18:58:22 +000035 <li>Expressive diagnostics (<a href="diagnostics.html">examples</a>)</li>
Cedric Venet084381332009-02-14 20:20:19 +000036 <li>GCC compatibility</li>
37 </ul>
38
Sylvestre Ledru29e2a582017-08-25 08:44:56 +000039 <p><b><a href="features.html#applications">Utility and
Cedric Venet084381332009-02-14 20:20:19 +000040 Applications</a></b>:</p>
41
42 <ul>
43 <li>Modular library based architecture</li>
44 <li>Support diverse clients (refactoring, static analysis, code generation,
Alp Toker344845b2014-01-16 17:04:52 +000045 etc.)</li>
Cedric Venet084381332009-02-14 20:20:19 +000046 <li>Allow tight integration with IDEs</li>
47 <li>Use the LLVM 'BSD' License</li>
48 </ul>
49
Sylvestre Ledru29e2a582017-08-25 08:44:56 +000050 <p><b><a href="features.html#design">Internal Design and
Cedric Venet084381332009-02-14 20:20:19 +000051 Implementation</a></b>:</p>
52
53 <ul>
54 <li>A real-world, production quality compiler</li>
55 <li>A simple and hackable code base</li>
56 <li>A single unified parser for C, Objective C, C++, and Objective C++</li>
57 <li>Conformance with C/C++/ObjC and their variants</li>
58 </ul>
59
60 <p>Of course this is only a rough outline of the goals and features of
Sylvestre Ledru29e2a582017-08-25 08:44:56 +000061 Clang. To get a true sense of what it is all about, see the <a
Cedric Venet084381332009-02-14 20:20:19 +000062 href="features.html">Features</a> section, which breaks
63 each of these down and explains them in more detail.</p>
64
Sylvestre Ledru29e2a582017-08-25 08:44:56 +000065
Cedric Venet084381332009-02-14 20:20:19 +000066 <!--=====================================================================-->
67 <h2>Why?</h2>
68 <!--=====================================================================-->
Sylvestre Ledru29e2a582017-08-25 08:44:56 +000069
Alp Toker344845b2014-01-16 17:04:52 +000070 <p>Development of the new front-end was started out of a need
Cedric Venet084381332009-02-14 20:20:19 +000071 for a compiler that allows better diagnostics, better integration with
72 IDEs, a license that is compatible with commercial products, and a
73 nimble compiler that is easy to develop and maintain. All of these were
74 motivations for starting work on a new front-end that could
75 meet these needs.</p>
Sylvestre Ledru29e2a582017-08-25 08:44:56 +000076
Cedric Venet084381332009-02-14 20:20:19 +000077 <p>For a more detailed comparison between Clang and other compilers, please
Richard Smithd9d42f92018-03-01 22:01:06 +000078 see the <a href="comparison.html">Clang comparison page</a>.</p>
Sylvestre Ledru29e2a582017-08-25 08:44:56 +000079
Cedric Venet084381332009-02-14 20:20:19 +000080 <!--=====================================================================-->
81 <h2>Current Status</h2>
82 <!--=====================================================================-->
Sylvestre Ledru29e2a582017-08-25 08:44:56 +000083
Alp Toker344845b2014-01-16 17:04:52 +000084 <p>Clang is considered to
Sylvestre Ledru29e2a582017-08-25 08:44:56 +000085 be a production quality C, Objective-C, C++ and Objective-C++ compiler when
86 targeting X86-32, X86-64, and ARM (other targets may have caveats, but are
Sylvestre Ledru5c3457d2018-09-14 09:08:21 +000087 usually easy to fix). As example, Clang is used in production to build
88 performance-critical software like Chrome or Firefox.<br /> If you are looking
89 for source analysis or source-to-source transformation tools, Clang is probably
90 a great solution for you. Clang supports C++11, C++14 and C++17, please see
91 the <a href="cxx_status.html">C++ status</a> page for more information.</p>
Cedric Venet084381332009-02-14 20:20:19 +000092
Cedric Venet084381332009-02-14 20:20:19 +000093 <!--=====================================================================-->
94 <h2>Get it and get involved!</h2>
95 <!--=====================================================================-->
Sylvestre Ledru29e2a582017-08-25 08:44:56 +000096
Cedric Venet084381332009-02-14 20:20:19 +000097 <p>Start by <a href="get_started.html">getting the code, building it, and
98 playing with it</a>. This will show you the sorts of things we can do
Mandeep Singh Granga2623c82016-02-10 21:06:10 +000099 today and will let you have the "Clang experience" first hand: hopefully
Cedric Venet084381332009-02-14 20:20:19 +0000100 it will "resonate" with you. :)</p>
Sylvestre Ledru29e2a582017-08-25 08:44:56 +0000101
Cedric Venet084381332009-02-14 20:20:19 +0000102 <p>Once you've done that, please consider <a href="get_involved.html">getting
Richard Smithd9d42f92018-03-01 22:01:06 +0000103 involved in the Clang community</a>. The Clang developers include numerous
Sylvestre Ledru29e2a582017-08-25 08:44:56 +0000104 volunteer contributors with a variety of backgrounds. If you're
Cedric Venet084381332009-02-14 20:20:19 +0000105 interested in
Mandeep Singh Granga2623c82016-02-10 21:06:10 +0000106 following the development of Clang, signing up for a mailing list is a good
Cedric Venet084381332009-02-14 20:20:19 +0000107 way to learn about how the project works.</p>
108</div>
109</body>
110</html>