April 2021
Intermediate to advanced
370 pages
7h 34m
English
In the previous chapter, we went through the structure of Clang—the official frontend of Low-Level Virtual Machine (LLVM) for C-family languages—and some of its most important components. We also introduced a variety of Clang's tooling and extension options. In this chapter, we're diving into the first phase in Clang's frontend pipeline: the preprocessor.
For C-family programming languages, preprocessing is an early compilation phase that replaces any directive starting with a hash (#) character—#include and #define, to name but a few—with some other textual contents (or non-textual tokens, in some rare cases). For example, the preprocessor will basically copy and paste contents of header files designated ...
Read now
Unlock full access