xref: /openbsd-src/gnu/llvm/clang/www/index.html (revision ec727ea710c91afd8ce4f788c5aaa8482b7b69b2)
1*e5dd7070Spatrick<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2*e5dd7070Spatrick          "http://www.w3.org/TR/html4/strict.dtd">
3*e5dd7070Spatrick<!-- Material used from: HTML 4.01 specs: http://www.w3.org/TR/html401/ -->
4*e5dd7070Spatrick<html>
5*e5dd7070Spatrick<head>
6*e5dd7070Spatrick  <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
7*e5dd7070Spatrick  <title>Clang C Language Family Frontend for LLVM</title>
8*e5dd7070Spatrick  <link type="text/css" rel="stylesheet" href="menu.css">
9*e5dd7070Spatrick  <link type="text/css" rel="stylesheet" href="content.css">
10*e5dd7070Spatrick</head>
11*e5dd7070Spatrick<body>
12*e5dd7070Spatrick<!--#include virtual="menu.html.incl"-->
13*e5dd7070Spatrick<div id="content">
14*e5dd7070Spatrick  <!--*********************************************************************-->
15*e5dd7070Spatrick  <h1>Clang: a C language family frontend for LLVM</h1>
16*e5dd7070Spatrick  <!--*********************************************************************-->
17*e5dd7070Spatrick
18*e5dd7070Spatrick  <p>The Clang project provides a language front-end and tooling infrastructure
19*e5dd7070Spatrick  for languages in the C language family (C, C++, Objective C/C++, OpenCL,
20*e5dd7070Spatrick  CUDA, and RenderScript) for the <a href="https://www.llvm.org/">LLVM</a>
21*e5dd7070Spatrick  project. Both a GCC-compatible compiler driver (<tt>clang</tt>) and an
22*e5dd7070Spatrick  MSVC-compatible compiler driver (<tt>clang-cl.exe</tt>) are provided. You
23*e5dd7070Spatrick  can <a href="get_started.html">get and build</a> the source today.</p>
24*e5dd7070Spatrick
25*e5dd7070Spatrick  <!--=====================================================================-->
26*e5dd7070Spatrick  <h2 id="goals">Features and Goals</h2>
27*e5dd7070Spatrick  <!--=====================================================================-->
28*e5dd7070Spatrick
29*e5dd7070Spatrick  <p>Some of the goals for the project include the following:</p>
30*e5dd7070Spatrick
31*e5dd7070Spatrick  <p><b><a href="features.html#enduser">End-User Features</a></b>:</p>
32*e5dd7070Spatrick
33*e5dd7070Spatrick  <ul>
34*e5dd7070Spatrick  <li>Fast compiles and low memory use</li>
35*e5dd7070Spatrick  <li>Expressive diagnostics (<a href="diagnostics.html">examples</a>)</li>
36*e5dd7070Spatrick  <li>GCC compatibility</li>
37*e5dd7070Spatrick  </ul>
38*e5dd7070Spatrick
39*e5dd7070Spatrick  <p><b><a href="features.html#applications">Utility and
40*e5dd7070Spatrick     Applications</a></b>:</p>
41*e5dd7070Spatrick
42*e5dd7070Spatrick  <ul>
43*e5dd7070Spatrick  <li>Modular library based architecture</li>
44*e5dd7070Spatrick  <li>Support diverse clients (refactoring, static analysis, code generation,
45*e5dd7070Spatrick   etc.)</li>
46*e5dd7070Spatrick  <li>Allow tight integration with IDEs</li>
47*e5dd7070Spatrick  <li>Use the LLVM 'Apache 2' License</li>
48*e5dd7070Spatrick  </ul>
49*e5dd7070Spatrick
50*e5dd7070Spatrick  <p><b><a href="features.html#design">Internal Design and
51*e5dd7070Spatrick     Implementation</a></b>:</p>
52*e5dd7070Spatrick
53*e5dd7070Spatrick  <ul>
54*e5dd7070Spatrick  <li>A real-world, production quality compiler</li>
55*e5dd7070Spatrick  <li>A simple and hackable code base</li>
56*e5dd7070Spatrick  <li>A single unified parser for C, Objective C, C++, and Objective C++</li>
57*e5dd7070Spatrick  <li>Conformance with C/C++/ObjC and their variants</li>
58*e5dd7070Spatrick  </ul>
59*e5dd7070Spatrick
60*e5dd7070Spatrick  <p>Of course this is only a rough outline of the goals and features of
61*e5dd7070Spatrick     Clang.  To get a true sense of what it is all about, see the <a
62*e5dd7070Spatrick     href="features.html">Features</a> section, which breaks
63*e5dd7070Spatrick     each of these down and explains them in more detail.</p>
64*e5dd7070Spatrick
65*e5dd7070Spatrick
66*e5dd7070Spatrick  <!--=====================================================================-->
67*e5dd7070Spatrick  <h2>Why?</h2>
68*e5dd7070Spatrick  <!--=====================================================================-->
69*e5dd7070Spatrick
70*e5dd7070Spatrick  <p>Development of the new front-end was started out of a need
71*e5dd7070Spatrick     for a compiler that allows better diagnostics, better integration with
72*e5dd7070Spatrick     IDEs, a license that is compatible with commercial products, and a
73*e5dd7070Spatrick     nimble compiler that is easy to develop and maintain.  All of these were
74*e5dd7070Spatrick     motivations for starting work on a new front-end that could
75*e5dd7070Spatrick     meet these needs.</p>
76*e5dd7070Spatrick
77*e5dd7070Spatrick  <!--=====================================================================-->
78*e5dd7070Spatrick  <h2>Current Status</h2>
79*e5dd7070Spatrick  <!--=====================================================================-->
80*e5dd7070Spatrick
81*e5dd7070Spatrick  <p>Clang is considered to
82*e5dd7070Spatrick   be a production quality C, Objective-C, C++ and Objective-C++ compiler when
83*e5dd7070Spatrick   targeting X86-32, X86-64, and ARM (other targets may have caveats, but are
84*e5dd7070Spatrick   usually easy to fix). As example, Clang is used in production to build
85*e5dd7070Spatrick   performance-critical software like Chrome or Firefox.<br />  If you are looking
86*e5dd7070Spatrick   for source analysis or source-to-source transformation tools, Clang is probably
87*e5dd7070Spatrick   a great solution for you.  Clang supports C++11, C++14 and C++17, please see
88*e5dd7070Spatrick   the <a href="cxx_status.html">C++ status</a> page for more information.</p>
89*e5dd7070Spatrick
90*e5dd7070Spatrick  <!--=====================================================================-->
91*e5dd7070Spatrick  <h2>Get it and get involved!</h2>
92*e5dd7070Spatrick  <!--=====================================================================-->
93*e5dd7070Spatrick
94*e5dd7070Spatrick  <p>Start by <a href="get_started.html">getting the code, building it, and
95*e5dd7070Spatrick     playing with it</a>.  This will show you the sorts of things we can do
96*e5dd7070Spatrick     today and will let you have the "Clang experience" first hand: hopefully
97*e5dd7070Spatrick     it will "resonate" with you. :)</p>
98*e5dd7070Spatrick
99*e5dd7070Spatrick  <p>Once you've done that, please consider <a href="get_involved.html">getting
100*e5dd7070Spatrick     involved in the Clang community</a>.  The Clang developers include numerous
101*e5dd7070Spatrick     volunteer contributors with a variety of backgrounds.  If you're
102*e5dd7070Spatrick     interested in
103*e5dd7070Spatrick     following the development of Clang, signing up for a mailing list is a good
104*e5dd7070Spatrick     way to learn about how the project works.</p>
105*e5dd7070Spatrick</div>
106*e5dd7070Spatrick</body>
107*e5dd7070Spatrick</html>
108