mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2026-07-19 23:24:47 -04:00
LLVMWriteBitcodeToFileHandle should work on all architectures now.
llvm-svn: 97856
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user