3 ms·
> learn to write little C programs and use clang to emit the IR. Highly recommend this. I used this to get an understanding of how to implement the IR for my l
by mrathi12 6y ago
> learn to write little C programs and use clang to emit the IR.
Highly recommend this. I used this to get an understanding of how to implement the IR for my language.
- mrathi12 6y agoThe command to use is `clang -S -emit-llvm -O1 foo.c` It'll write it out to a foo.ll file. (I use -O1 so it cleans up a bit of the messy parts of the IR).