[llvm] r186480 - raw_ostream.cpp: Introduce <fcntl.h> to let O_BINARY provided. Or, llvm::outs() would be set to O_TEXT by default.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Tue Jul 16 21:01:52 PDT 2013


thanks and sorry for the breakage!

On 16 July 2013 22:21, NAKAMURA Takumi <geek4civic at gmail.com> wrote:
> 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 -
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list