Book Image

Getting started with LLVM core libraries

Book Image

Getting started with LLVM core libraries

Overview of this book

Table of Contents (17 chapters)
Getting Started with LLVM Core Libraries
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 4. The Frontend

The compiler frontend converts source code into the compiler's intermediate representation prior to target-specific code generation. Since programming languages have distinct syntax and semantic domains, frontends usually handle either a single language or a group of similar ones. Clang, for instance, handles C, C++, and objective-C source code inputs. In this chapter, we will cover the following topics:

  • How to link programs with Clang libraries and use libclang

  • Clang diagnostics and the Clang frontend stages

  • Lexical, syntactical, and semantic analyses with libclang examples

  • How to write a simplified compiler driver that uses the C++ Clang libraries