4
Basic Libraries and Tools
LLVM is written in the C++ language and, as of July 2022, it uses the C++17 version of the C++ standard [6]. LLVM actively utilizes functionality provided by the Standard Template Library (STL). On the other hand, LLVM contains numerous internal implementations [13] for fundamental containers, primarily aimed at optimizing performance. For example, llvm
::
SmallVector
has an interface similar to std
::
vector
but features an internally optimized implementation. Hence, familiarity with these extensions is essential for anyone wishing to work with LLVM and Clang.
Additionally, LLVM has introduced other development tools such as TableGen, a domain specific language (DSL) designed for structural data processing, and LIT (LLVM Integrated Tester), the LLVM test framework. More details about these tools are discussed later in this chapter. We’ll cover the following topics in this chapter:
LLVM coding style
LLVM basic libraries
Clang basic libraries
LLVM supporting...