O'Reilly logo

Getting Started with LLVM Core Libraries by Rafael Auler, Bruno Cardoso Lopes

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Writing your own tool

The Clang project provides three interfaces that a user can rely on to utilize Clang features and its parsing capabilities, including syntactic and semantic analyses. First, there is libclang, the primary way of interfacing with Clang, which provides a stable C API and allows an external project to plug it in and have a high-level access to the entire framework. This stable interface seeks to preserve backwards compatibility with older versions, avoiding breaking your software when a newer libclang is released. It is also possible to use libclang from other languages, for example, using the Clang Python Bindings. Apple Xcode, for instance, interacts with Clang via libclang.

Secondly, there are Clang Plugins that allow you ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required