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 | 381268e629041da9add8736ddbfe87b7bb420f38 (patch) | |
tree | d375bbed34449f4f19d3ef8d67a2fffb64830420 /llvm/lib/Bitcode/Writer/BitWriter.cpp | |
parent | dc78d16a03bfbab573da26915995c18f172c3555 (diff) | |
download | bcm5719-llvm-381268e629041da9add8736ddbfe87b7bb420f38.tar.gz bcm5719-llvm-381268e629041da9add8736ddbfe87b7bb420f38.zip |
Add a LLVMWriteBitcodeToFD that exposes the raw_fd_ostream options.
llvm-svn: 97858
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitWriter.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Writer/BitWriter.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitWriter.cpp b/llvm/lib/Bitcode/Writer/BitWriter.cpp index 6119c428895..42884224633 100644 --- a/llvm/lib/Bitcode/Writer/BitWriter.cpp +++ b/llvm/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); +} |