The LLVM project is getting into the standard library game. With last week’s release of LLVM version 2.8 came new sub-projects aimed at making compilation easier for developers.
These new projects include the new LLDB debugger, and a fresh standard C++ library that the LLVM team hopes will become a standard for C++ coders both today and in the future.
The library, Libc++, will now be a standard part of the LLVM compiler infrastructure. It is a complete rewrite of the standard C++ library specifically targeting the C++0x update to the language, which has been in development for some time. The LLVM team claims Libc++ is almost feature-complete, but it also wrote in the release notes that future versions will benefit from further testing and integration with Clang.
Clang, the LLVM front end for C, C++ and Objective-C, was also updated in the 2.8 release. For the first time, Clang fully implements the ISO standard for C++. This release also supports Objective-C++, the GCC front end for compiling applications that use both C++ and Objective-C syntax. Objective-C++ brings the same extensions to C++ that Objective-C adds to C.
The LLVM team has taken full advantage of the GCC modularization updates in GCC 4.5. LLVM’s DragonEgg is a GCC plug-in that forces GCC to swap out its own optimizers and code generators for those of LLVM.
The new Low Level Debugger is, perhaps, the most significant new project in the 2.8 release. It uses existing libraries in the LLVM project to offer thorough debugging capabilities, and it uses the LLVM JIT, disassembler and the Clang expression parser to allow developers to wade through broken code.
Unfortunately, LLDB is not yet mature, and while it is being announced with the release of LLVM 2.8, it is a separate download, not included with the standard LLVM 2.8 package. As it matures, it will move into the standard rollout.
The LLVM team has also been working on bringing the project to Java developers through the VMKit project. That project uses LLVM for JIT and static Java compilation, and the team has begun work on offering the same support to other languages. In version 2.8, the Java VMKit supports copying garbage collectors. All work planned for the .NET platform in VMKit has been cancelled as of the 2.8 release.
LLVM 2.8 also includes hundreds of new bug fixes, compiler features and optimization improvements. The compiler now uses the Machine Code Streamer assembler API, and the code generator has been significantly improved overall. LLVM is the primary compiler infrastructure used by Apple for the iPhone, and the company employs many of the core contributors to the project.