To emit LLVM IR from a c file, run :
$ clang -emit-llvm -S myFile.c -o myIR.ll
- The lexer breaks C code into a token stream (token example : identifier, literal, operator, ...)
- Feed the token stream to the parser, which builds the Absract Syntax Tree (AST) with the help of Context Free Grammar (CFG) for the language
- Semantic analysis
- IR generation