mirror of
https://github.com/RPCS3/llvm.git
synced 2025-03-06 01:27:08 +00:00
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:
parent
06a26637da
commit
760640599e
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user