inkwell icon indicating copy to clipboard operation
inkwell copied to clipboard

TargetMachine::write_to_file documentation is incorrect

Open programmerjake opened this issue 3 years ago • 1 comments

TargetMachine::write_to_file (wrapped and TargetMachine::write_to_memory_buffer are both functions for compiling an LLVM Module to assembly language or to machine code, writing the results to a file or to memory. They are misdocumented as being functions that write the TargetMachine to a file/memory-buffer instead of being functions to compile LLVM IR to assembly/machine code.

https://github.com/llvm/llvm-project/blob/5d214238a15ca28cca99f1a5db6ff8c4c5866711/llvm/include/llvm-c/TargetMachine.h#L135

programmerjake avatar Apr 13 '21 00:04 programmerjake

It might be a good idea to deprecate/remove write_to_file and write_to_memory_buffer and create new functions compile_to_file and compile_to_memory_buffer, since the write_* function names are misleading.

programmerjake avatar Apr 15 '21 03:04 programmerjake