Cling: A C++ Interpreter Based on Clang/LLVM
Cling is a C++ interpreter built on Clang/LLVM.
While it’s primarily meant as a REPL, Cling has been explored as a meta-programming backend:
-
Lets you execute C++ code at runtime or compile time interactively.
-
Some research prototypes used Cling as a JIT inside the compiler to do meta-programming, generating code on-the-fly.
-
It’s not fully integrated into
clang++for ahead-of-time compilation, but there’s interest in this space, especially at CERN.