From 212c80ac5dd13b79cdfe5ee39b7bc17a200f47cd Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Wed, 17 Jul 2013 02:21:10 +0000 Subject: [PATCH] raw_ostream.cpp: Introduce 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. llvm-svn: 186480 --- llvm/lib/Support/raw_ostream.cpp | 5 +++++ llvm/test/Object/check_binary_output.ll | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/llvm/lib/Support/raw_ostream.cpp b/llvm/lib/Support/raw_ostream.cpp index 3e5ce04d755e..92fa8b50a15e 100644 --- a/llvm/lib/Support/raw_ostream.cpp +++ b/llvm/lib/Support/raw_ostream.cpp @@ -27,6 +27,11 @@ #include #include +// may provide O_BINARY. +#if defined(HAVE_FCNTL_H) +# include +#endif + #if defined(HAVE_UNISTD_H) # include #endif diff --git a/llvm/test/Object/check_binary_output.ll b/llvm/test/Object/check_binary_output.ll index 02b52a3601ca..567f18e65ba5 100644 --- a/llvm/test/Object/check_binary_output.ll +++ b/llvm/test/Object/check_binary_output.ll @@ -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 -