mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
Add a LLVMWriteBitcodeToFD that exposes the raw_fd_ostream options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97858 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -27,9 +27,14 @@ int LLVMWriteBitcodeToFile(LLVMModuleRef M, const char *Path) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int LLVMWriteBitcodeToFileHandle(LLVMModuleRef M, int FileHandle) {
|
||||
raw_fd_ostream OS(FileHandle, true);
|
||||
int LLVMWriteBitcodeToFD(LLVMModuleRef M, int FD, int ShouldClose,
|
||||
int Unbuffered) {
|
||||
raw_fd_ostream OS(FD, ShouldClose, Unbuffered);
|
||||
|
||||
WriteBitcodeToFile(unwrap(M), OS);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int LLVMWriteBitcodeToFileHandle(LLVMModuleRef M, int FileHandle) {
|
||||
return LLVMWriteBitcodeToFD(M, FileHandle, true, false);
|
||||
}
|
||||
|
Reference in New Issue
Block a user