I've read through the llvm Kaleidoscope tutorial, but it's about how to use their tools. I'm looking for a way to write my own code that allow me to take an abstract syntax tree and generate the llvm IR.
Unfortunately, I'm a little lost on how to go about doing that. My current idea was to have each node of my AST do a fill in the blank style string generation. However this seems inelegant, and there is probably a better way to do this.
I read this question which is simalar to mine, but from my understanding of the llvm IR, which could be completely off, is that it behaves similar to a higher level language than traditional assembly languages, with it having functions, and variables(infinite registers). So I think different techniques may apply.