Chapter 6: IR Generation for High-Level Language Constructs

High-level languages today usually make use of aggregate data types and object-oriented programming (OOP) constructs. LLVM IR has some support for aggregate data types, and we must implement OOP constructs such as classes on our own. Adding aggregate types gives rise to the question of how parameters of an aggregate type are passed. Different platforms have different rules, and this is also reflected in the IR. Being compliant with the calling convention ensures that system functions can be called.

In this chapter, you will learn how to translate aggregate data types and pointers to LLVM IR, and how to pass parameters to a function in a system-compliant way. You'll also learn how to ...

Get Learn LLVM 12 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.