LLVMWriteBitcodeToFileHandle should work on all architectures now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97856 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Erick Tryzelaar 2010-03-06 00:29:58 +00:00
parent 06a26637da
commit 760640599e

View File

@ -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