Clang

Clang [ klæŋ ] is a compiler front-end for the C programming language, C , Objective -C and Objective- C . It features compared with other compiler frontends more extensive and more accurate static and dynamic analysis methods that facilitate troubleshooting. In addition, it allows for faster translations of source texts with less memory usage and as a result often small executable programs. Clang was designed as a front end for the LLVM compiler backend; The modular design of Clang getting his constituents but also integrate into other products.

Clang is under a BSD-like license. Unlike the GNU General Public License is in the liberal BSD license no compulsion, all source code of programs disclose the Clang or use parts of it, which is often especially for commercial products of interest.

Using the compiler

The Clang development project is closely linked with the LLVM project. It was developed as a replacement for the GCC compiler front-end. Since September 2009, Clang officially considered stable and productive usable and can be found with LLVM version 2.6 as an integral part in the LLVM compiler package. Since version 2.7, the programming language C is officially supported. Clang can, however, also without LLVM as a purely static program analysis and fault diagnosis tool, for example when used with other compilers use.

Since version 3.0, the LLVM project is supported by GCC compiler no longer, but sets Clang, or alternatively, the Dragonegg plug, binding advance. On 12 May 2012, the FreeBSD project announced the switch to Clang instead of GCC as the default compiler from version 10.0 of the operating system.

On the Apple Macintosh Clang is the standard compiler for Google Chrome. Clang Apple's Xcode for C, Objective -C and C programming languages ​​for static code analysis in the integrated development environment.

Comparison with GCC

In addition to GCC Clang is a common compiler in the open source environment. It differs both from a technical and legal point of view license of GCC.

Benefits of Clang over GCC are the modularity and the BSD -like license. The modularity Clang is reusable compared to GCC better in other programs such as integrated development environments.

Clang is often faster than gcc or g . Both in processing the syntax and the machine code generation, he usually has a head start in the order of a factor of 2 or more. However, the total time improvement will depend on the scenario. Specifically, under Linux these conditions is often not as high as for example in typical Apple systems environments and tasks.

Version numbers

The version numbers increase with LLVM and Clang usually about every six months to one decimal place. The LLVM and Clang version numbers correspond to Apple's integrated development environment Xcode yet another version numbers.

Course and relationship of the version numbering:

Formation

On July 11, 2007 Clang has been released under an open source license.

At the conference BSDCan 2008 Clang as part of the lecture " LLVM and Clang: Next Generation Compiler Technology" presented by the LLVM project manager Chris Lattner. Then, on the Apple Developer Conference Worldwide Developers Conference 2009, Clang through the presentations by Chris Lattner and developer Doug Gregory and Ted Kremenek was presented.

In June 2010, Apple decided to integrate Clang in the Xcode development environment.

During a presentation Clang was presented in February 2012 on the Microsoft Developer Conference Going Native in 2012.

12 May 2012 it was announced that the FreeBSD project umsteigt with version 10 of the operating system on Clang instead of GCC as the default compiler.

191736
de