How to save IR to a file and build it to an executable file?
问题 Now I use clang build my .c file to .s file. And I have used the llvm API modify the IR. However, now I can't save my modified IR to a file. I want to use "LLVMWriteBitcodeToFile", but I can't find the struct of "LLVMOpaqueModule"; I want to use "WriteBitcodeToFile", it always show me "type mismatch". And I also want to know how to build an IR file to a executable file. Next are two methods I use to save a module: 1、First use WriteBitcodeToFile bool unbuffered = false; llvm::raw_ostream ro