diff options
author | Nico Weber <nicolasweber@gmx.de> | 2018-04-29 00:45:03 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2018-04-29 00:45:03 +0000 |
commit | 712e8d29c4a52abded4414f673b51dd53dd018f1 (patch) | |
tree | 4b99dbe86251f1a62c3aefd587e57aa540795ee6 /llvm/lib/Support/raw_ostream.cpp | |
parent | d3d3d6b75d43c52eaa2bcbe5bab7be10ff329695 (diff) | |
download | llvm-712e8d29c4a52abded4414f673b51dd53dd018f1.zip llvm-712e8d29c4a52abded4414f673b51dd53dd018f1.tar.gz llvm-712e8d29c4a52abded4414f673b51dd53dd018f1.tar.bz2 |
s/LLVM_ON_WIN32/_WIN32/, llvm
LLVM_ON_WIN32 is set exactly with MSVC and MinGW (but not Cygwin) in
HandleLLVMOptions.cmake, which is where _WIN32 defined too. Just use the
default macro instead of a reinvented one.
See thread "Replacing LLVM_ON_WIN32 with just _WIN32" on llvm-dev and cfe-dev.
No intended behavior change.
This moves over all uses of the macro, but doesn't remove the definition
of it in (llvm-)config.h yet.
llvm-svn: 331127
Diffstat (limited to 'llvm/lib/Support/raw_ostream.cpp')
-rw-r--r-- | llvm/lib/Support/raw_ostream.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Support/raw_ostream.cpp b/llvm/lib/Support/raw_ostream.cpp index c0e210b..68f2f7a 100644 --- a/llvm/lib/Support/raw_ostream.cpp +++ b/llvm/lib/Support/raw_ostream.cpp @@ -59,7 +59,7 @@ #endif #endif -#ifdef LLVM_ON_WIN32 +#ifdef _WIN32 #include "Windows/WindowsSupport.h" #endif @@ -533,7 +533,7 @@ raw_fd_ostream::raw_fd_ostream(int fd, bool shouldClose, bool unbuffered) // Get the starting position. off_t loc = ::lseek(FD, 0, SEEK_CUR); -#ifdef LLVM_ON_WIN32 +#ifdef _WIN32 // MSVCRT's _lseek(SEEK_CUR) doesn't return -1 for pipes. sys::fs::file_status Status; std::error_code EC = status(FD, Status); @@ -586,7 +586,7 @@ void raw_fd_ostream::write_impl(const char *Ptr, size_t Size) { // It is observed that Linux returns EINVAL for a very large write (>2G). // Make it a reasonably small value. MaxWriteSize = 1024 * 1024 * 1024; -#elif defined(LLVM_ON_WIN32) +#elif defined(_WIN32) // Writing a large size of output to Windows console returns ENOMEM. It seems // that, prior to Windows 8, WriteFile() is redirecting to WriteConsole(), and // the latter has a size limit (66000 bytes or less, depending on heap usage). @@ -639,7 +639,7 @@ void raw_fd_ostream::close() { uint64_t raw_fd_ostream::seek(uint64_t off) { assert(SupportsSeeking && "Stream does not support seeking!"); flush(); -#ifdef LLVM_ON_WIN32 +#ifdef _WIN32 pos = ::_lseeki64(FD, off, SEEK_SET); #elif defined(HAVE_LSEEK64) pos = ::lseek64(FD, off, SEEK_SET); |