Interface for LLVM compiler

I am trying to develop a compiler based on the LLVM infrastructure. My language has syntax like C, so I would like to use the existing C compilers. Now I am focused on the interface (lexical analysis, parsing), but I am confused about which interface is best suited. Clang, llvm-gcc or traditional flex / bison tools?

I am particularly interested in the simplest solution that would allow me to generate LLVM IR code for the next steps of my compiler.

+5
source share
1 answer

If you want to encode everything manually, I recommend the LLVM Kaleidoscope tutorial:

+2
source

All Articles