I am using Python's LLVM bindings to generate code for a custom language.
Now I want to run programs and check if their output works correctly - but I am unable to figure out exactly how to output anything.
Is there some way to write to stdout
or to a file using LLVM bindings?
Or do I need to call printf
from the C library?
How do I do either one of these?
Note: I am not using JIT / ExecutionEngine, so LLVM doesn't automatically find the printf
function.