Add a LLVMWriteBitcodeToFD that exposes the raw_fd_ostream options.
[oota-llvm.git] / include / llvm-c / BitWriter.h
index 008ff9f2c1063a84f4b5a2ca60e05214da139f5b..bcbfb111492a3ee5607582227645434990b8b32f 100644 (file)
@@ -28,13 +28,16 @@ extern "C" {
 
 /*===-- Operations on modules ---------------------------------------------===*/
 
-/* Writes a module to an open file descriptor. Returns 0 on success.
-   Closes the Handle. Use dup first if this is not what you want. */ 
-int LLVMWriteBitcodeToFileHandle(LLVMModuleRef M, int Handle);
-
-/* Writes a module to the specified path. Returns 0 on success. */ 
+/** Writes a module to the specified path. Returns 0 on success. */ 
 int LLVMWriteBitcodeToFile(LLVMModuleRef M, const char *Path);
 
+/** Writes a module to an open file descriptor. Returns 0 on success. */
+int LLVMWriteBitcodeToFD(LLVMModuleRef M, int FD, int ShouldClose,
+                         int Unbuffered);
+
+/** Deprecated for LLVMWriteBitcodeToFD. Writes a module to an open file
+    descriptor. Returns 0 on success. Closes the Handle. */ 
+int LLVMWriteBitcodeToFileHandle(LLVMModuleRef M, int Handle);
 
 #ifdef __cplusplus
 }