mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 16:17:17 +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:
@@ -27,20 +27,9 @@ int LLVMWriteBitcodeToFile(LLVMModuleRef M, const char *Path) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR >= 4)
|
|
||||||
#include <ext/stdio_filebuf.h>
|
|
||||||
|
|
||||||
int LLVMWriteBitcodeToFileHandle(LLVMModuleRef M, int FileHandle) {
|
int LLVMWriteBitcodeToFileHandle(LLVMModuleRef M, int FileHandle) {
|
||||||
raw_fd_ostream OS(FileHandle, false);
|
raw_fd_ostream OS(FileHandle, false);
|
||||||
|
|
||||||
WriteBitcodeToFile(unwrap(M), OS);
|
WriteBitcodeToFile(unwrap(M), OS);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
int LLVMWriteBitcodeToFileHandle(LLVMModuleRef M, int FileHandle) {
|
|
||||||
return -1; // Not supported.
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
Reference in New Issue
Block a user