summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Writer/BitWriter.cpp
diff options
context:
space:
mode:
authorGordon Henriksen <gordonhenriksen@mac.com>2008-06-11 10:46:24 +0000
committerGordon Henriksen <gordonhenriksen@mac.com>2008-06-11 10:46:24 +0000
commita2fef0c117545092e6d1c7a47b814509b767c112 (patch)
treeff5bebd8636264ae6b02a066e7cbe14e3f28e999 /llvm/lib/Bitcode/Writer/BitWriter.cpp
parent3453c7bcb50da0b73b20dfd52034787007695d14 (diff)
downloadbcm5719-llvm-a2fef0c117545092e6d1c7a47b814509b767c112.tar.gz
bcm5719-llvm-a2fef0c117545092e6d1c7a47b814509b767c112.zip
Better test for availability of __gnu_cxx::stdio_filebuf.
If this doesn't work, I'll write a configure test. llvm-svn: 52213
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitWriter.cpp')
-rw-r--r--llvm/lib/Bitcode/Writer/BitWriter.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitWriter.cpp b/llvm/lib/Bitcode/Writer/BitWriter.cpp
index 1aac5006d8f..8834964b040 100644
--- a/llvm/lib/Bitcode/Writer/BitWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitWriter.cpp
@@ -28,7 +28,7 @@ int LLVMWriteBitcodeToFile(LLVMModuleRef M, const char *Path) {
return 0;
}
-#ifdef __GNUC__
+#if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR >= 4)
#include <ext/stdio_filebuf.h>
// FIXME: Control this with configure? Provide some portable abstraction in
@@ -49,4 +49,10 @@ int LLVMWriteBitcodeToFileHandle(LLVMModuleRef M, int FileHandle) {
return 0;
}
+#else
+
+int LLVMWriteBitcodeToFileHandle(LLVMModuleRef M, int FileHandle) {
+ return -1; // Not supported.
+}
+
#endif
OpenPOWER on IntegriCloud