clang
Clang is a compiler front end for the C, C++, and Objective-C
programming languages. It uses the Low
Level Virtual Machine (LLVM) as its back end. The combination
of clang and LLVM
provides the majority of a toolchain, allowing the replacement
of the whole GCC
stack.
One of clang's primary goals is to better support incremental
compilation to allow the compiler to be more tightly tied to the IDE
GUI.
Clang is carefully and thoughtfully designed and built to
provide the foundation of a whole new generation of C/C++/Objective C
development tools.
Clang supports a broad variety of language extensions. These
extensions are provided to
be compatible with
the GCC,
Microsoft, and other popular compilers as well as to improve
functionality
through clang-specific features. The Clang driver and language features
are
intentionally designed to be as compatible with the GCC
compiler as
reasonably possible, easing migration from GCC
to Clang.
Features include:
- Fast compiles and low memory use -
the library-based architecture of clang makes it straight-forward to
time and profile the cost of each layer of the stack
- Expressive diagnostics, making the diagnostics (error and
warning messages) generated by the compiler be as useful as possible
- GCC compatibility
- Modular library based architecture:
- libsupport - Basic support library, from LLVM
- libsystem - System abstraction library, from LLVM
- libbasic - Diagnostics, SourceLocations, SourceBuffer
abstraction, file system caching for input source files
- libast - Provides classes to represent the C AST, the C
type system, builtin functions, and various helpers for analyzing and
manipulating the AST (visitors, pretty printers, etc)
- liblex - Lexing and preprocessing, identifier hash table,
pragma handling, tokens, and macro expansion
- libparse - Parsing. This library invokes coarse-grained
'Actions' provided by the client (e.g. libsema builds ASTs) but knows
nothing about ASTs or other client-specific data structures
- libsema - Semantic Analysis. This provides a set of
parser actions to build a standardized AST for programs
- libcodegen - Lower the AST to LLVM
IR for optimization
& code generation
- librewrite - Editing of text buffers (important for code
rewriting transformation, like refactoring)
- libanalysis - Static analysis support
- libindex - Cross-translation-unit infrastructure and
indexing support
- clang - A driver program, client of the libraries at
various levels
- Support diverse clients (refactoring, static analysis, code
generation, etc)
- Allow tight integration with IDEs
- A real-world, production quality compiler
- A simple and hackable code base
- A single unified parser for C, Objective C, C++, and
Objective C++
- Conformance with C/C++/ObjC and their variants
Return
to Compilers Home Page
Last Updated Monday, November 05 2012 @ 02:56 PM EST |