[llvm] r186480 - raw_ostream.cpp: Introduce <fcntl.h> to let O_BINARY provided. Or, llvm::outs() would be set to O_TEXT by default.
NAKAMURA Takumi
geek4civic at gmail.com
Tue Jul 16 19:21:11 PDT 2013
Author: chapuni
Date: Tue Jul 16 21:21:10 2013
New Revision: 186480
URL: http://llvm.org/viewvc/llvm-project?rev=186480&view=rev
Log:
raw_ostream.cpp: Introduce <fcntl.h> to let O_BINARY provided. Or, llvm::outs() would be set to O_TEXT by default.
llvm/test/Object/check_binary_output.ll is expected to pass on win32.
Modified:
llvm/trunk/lib/Support/raw_ostream.cpp
llvm/trunk/test/Object/check_binary_output.ll
Modified: llvm/trunk/lib/Support/raw_ostream.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/raw_ostream.cpp?rev=186480&r1=186479&r2=186480&view=diff
==============================================================================
--- llvm/trunk/lib/Support/raw_ostream.cpp (original)
+++ llvm/trunk/lib/Support/raw_ostream.cpp Tue Jul 16 21:21:10 2013
@@ -27,6 +27,11 @@
#include <cerrno>
#include <sys/stat.h>
+// <fcntl.h> may provide O_BINARY.
+#if defined(HAVE_FCNTL_H)
+# include <fcntl.h>
+#endif
+
#if defined(HAVE_UNISTD_H)
# include <unistd.h>
#endif
Modified: llvm/trunk/test/Object/check_binary_output.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/check_binary_output.ll?rev=186480&r1=186479&r2=186480&view=diff
==============================================================================
--- llvm/trunk/test/Object/check_binary_output.ll (original)
+++ llvm/trunk/test/Object/check_binary_output.ll Tue Jul 16 21:21:10 2013
@@ -1,7 +1,4 @@
; This is not an assembly file, this is just to run the test.
; The test verifies that llvm-ar produces a binary output.
-; FIXME: They malform LF into CRLF. Investigating.
-; XFAIL: mingw32,win32
-
;RUN: llvm-ar p %p/Inputs/GNU.a very_long_bytecode_file_name.bc | cmp -s %p/Inputs/very_long_bytecode_file_name.bc -
More information about the llvm-commits
mailing list