As we can see, even in the case of a single inheritance, the LLVM IR that is generated can appear…

The basic idea to implement this is to associate a table with function pointers with each object. Here, a table…

A class is a collection of data and methods. A class can inherit from another class, potentially adding more data…

To set multiple attributes, you can use the llvm::AttrBuilder class. The other way to provide additional information is to use…

In LLVM, the IR code is run through a pipeline of passes. Each pass performs a single task, such as…

The IR module is the brace around all elements we generate for a compilation unit. At the global level, we…

We are almost done with emitting the IR code for a function! We only need to put the pieces together…

The parameters of a function also need some consideration. First, we need to map the types of the source language…

Functions (and also global variables) have a linkage style attached. With the linkage style, we define the visibility of a…

In general, you translate expressions, as shown in Chapter 2, The Structure of a Compiler. The only interesting part is…