While learning Antlr4, I used Golang as a target language, so a statement in my toy language like:
$myVar = 10
$myVar + 5
Would translate to some Golang code that generates "15" for the result
However, as far as I can see, there isn't an LLVM IR target for ANTLR, so the question is: what are my options?
1) Generate C/C++ and then use it to emit LLVM IR?
2) Try to find a Golang LLVM IR emitter?
3) Keep using the generated Go lexer/parser but hand-write LLVM IR?
I tried to go through the LLVM documentation and watched a few videos on LLVM< but they all seem to generate C/C++ and then communicate with the API that way. Not sure if they do that because that's what they know or if it's because that's the only way.
Thanks in advance for any insights!