diff options
author | Erick Tryzelaar <idadesub@users.sourceforge.net> | 2010-03-06 00:30:06 +0000 |
---|---|---|
committer | Erick Tryzelaar <idadesub@users.sourceforge.net> | 2010-03-06 00:30:06 +0000 |
commit | e623050048e56a512e77c28b69925e7dc1efa6ad (patch) | |
tree | 4e7f07dc84a9d5629597884c45591e4089aab801 /lib/Bitcode | |
parent | b3195fbc2e19755c581eaa3aa52bfc1640c8495a (diff) | |
download | external_llvm-e623050048e56a512e77c28b69925e7dc1efa6ad.zip external_llvm-e623050048e56a512e77c28b69925e7dc1efa6ad.tar.gz external_llvm-e623050048e56a512e77c28b69925e7dc1efa6ad.tar.bz2 |
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
Diffstat (limited to 'lib/Bitcode')
-rw-r--r-- | lib/Bitcode/Writer/BitWriter.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Bitcode/Writer/BitWriter.cpp b/lib/Bitcode/Writer/BitWriter.cpp index 6119c42..4288422 100644 --- a/lib/Bitcode/Writer/BitWriter.cpp +++ b/lib/Bitcode/Writer/BitWriter.cpp @@ -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); +} |