[lld] r329696 - s/LLVM_ON_WIN32/_WIN32/, lld

Nico Weber via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 10 06:15:21 PDT 2018


Author: nico
Date: Tue Apr 10 06:15:21 2018
New Revision: 329696

URL: http://llvm.org/viewvc/llvm-project?rev=329696&view=rev
Log:
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. 

Modified:
    lld/trunk/COFF/Driver.cpp
    lld/trunk/ELF/Filesystem.cpp

Modified: lld/trunk/COFF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Driver.cpp?rev=329696&r1=329695&r2=329696&view=diff
==============================================================================
--- lld/trunk/COFF/Driver.cpp (original)
+++ lld/trunk/COFF/Driver.cpp Tue Apr 10 06:15:21 2018
@@ -97,7 +97,7 @@ typedef std::pair<std::unique_ptr<Memory
 // Create a std::future that opens and maps a file using the best strategy for
 // the host platform.
 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
   // asynchronously.
   auto Strategy = std::launch::async;

Modified: lld/trunk/ELF/Filesystem.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Filesystem.cpp?rev=329696&r1=329695&r2=329696&view=diff
==============================================================================
--- lld/trunk/ELF/Filesystem.cpp (original)
+++ lld/trunk/ELF/Filesystem.cpp Tue Apr 10 06:15:21 2018
@@ -44,7 +44,7 @@ using namespace lld::elf;
 // The calling thread returns almost immediately.
 void elf::unlinkAsync(StringRef Path) {
 // Removing a file is async on windows.
-#if defined(LLVM_ON_WIN32)
+#if defined(_WIN32)
   sys::fs::remove(Path);
 #else
   if (!ThreadsEnabled || !sys::fs::exists(Path) ||




More information about the llvm-commits mailing list