What is the "correct" way to output data to the console using LLVM? To be clear, I'm looking for the LLVM IR which will write to the console, rather than some special version of std::cout
in the LLVM library. All examples which accomplish this that I have found seem to link to external C libraries for their output. Is there really no intrinsic way to do this?
Of course not. Writing to the console has nothing to do with LLVM. It is a library function. LLVM targets machines that don't even have consoles. Trying to write to the console with LLVM does not make sense- you must invoke, at minimum, an OS API to achieve it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With