Skip to content

Commit

Permalink
LLVMWriteBitcodeToFileHandle should work on all architectures now.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97856 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Erick Tryzelaar committed Mar 6, 2010
1 parent 06a2663 commit 7606405
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions lib/Bitcode/Writer/BitWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,9 @@ int LLVMWriteBitcodeToFile(LLVMModuleRef M, const char *Path) {
return 0;
}

#if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR >= 4)
#include <ext/stdio_filebuf.h>

int LLVMWriteBitcodeToFileHandle(LLVMModuleRef M, int FileHandle) {
raw_fd_ostream OS(FileHandle, false);

WriteBitcodeToFile(unwrap(M), OS);
return 0;
}

#else

int LLVMWriteBitcodeToFileHandle(LLVMModuleRef M, int FileHandle) {
return -1; // Not supported.
}

#endif

0 comments on commit 7606405

Please sign in to comment.