s/LLVM_ON_WIN32/_WIN32/, lld

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. 

llvm-svn: 329696
This commit is contained in:
Nico Weber 2018-04-10 13:15:21 +00:00
parent 0da2290958
commit fb64730005
2 changed files with 2 additions and 2 deletions

View File

@ -97,7 +97,7 @@ typedef std::pair<std::unique_ptr<MemoryBuffer>, std::error_code> MBErrPair;
// Create a std::future that opens and maps a file using the best strategy for // Create a std::future that opens and maps a file using the best strategy for
// the host platform. // the host platform.
static std::future<MBErrPair> createFutureForFile(std::string Path) { static std::future<MBErrPair> createFutureForFile(std::string Path) {
#if LLVM_ON_WIN32 #if _WIN32
// On Windows, file I/O is relatively slow so it is best to do this // On Windows, file I/O is relatively slow so it is best to do this
// asynchronously. // asynchronously.
auto Strategy = std::launch::async; auto Strategy = std::launch::async;

View File

@ -44,7 +44,7 @@ using namespace lld::elf;
// The calling thread returns almost immediately. // The calling thread returns almost immediately.
void elf::unlinkAsync(StringRef Path) { void elf::unlinkAsync(StringRef Path) {
// Removing a file is async on windows. // Removing a file is async on windows.
#if defined(LLVM_ON_WIN32) #if defined(_WIN32)
sys::fs::remove(Path); sys::fs::remove(Path);
#else #else
if (!ThreadsEnabled || !sys::fs::exists(Path) || if (!ThreadsEnabled || !sys::fs::exists(Path) ||