Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool unbuffered = false;
- llvm::raw_ostream ro(unbuffered);
- WriteBitcodeToFile(m, ro);
- const char *Path = "hello2.s";
- int ans = LLVMWriteBitcodeToFile(m, Path);
- std::error_code EC;
- llvm::raw_fd_ostream OS("module", EC, llvm::sys::fs::F_None);
- WriteBitcodeToFile(pBiFModule, OS);
- OS.flush();
- /** Emits an asm or object file for the given module to the filename. This
- wraps several c++ only classes (among them a file stream). Returns any
- error in ErrorMessage. Use LLVMDisposeMessage to dispose the message. */
- LLVMBool LLVMTargetMachineEmitToFile(LLVMTargetMachineRef T, LLVMModuleRef M,
- char *Filename, LLVMCodeGenFileType codegen, char **ErrorMessage);
- /** Compile the LLVM IR stored in p M and store the result in p OutMemBuf. */
- LLVMBool LLVMTargetMachineEmitToMemoryBuffer(LLVMTargetMachineRef T, LLVMModuleRef M,
- LLVMCodeGenFileType codegen, char** ErrorMessage, LLVMMemoryBufferRef *OutMemBuf);
Add Comment
Please, Sign In to add comment