From 29a60e6deba1f4f77d7f688017af66c90f5d6580 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Wed, 12 Feb 2014 21:26:20 +0000 Subject: [PATCH] Rename Windows.h to WindowsSupport.h to avoid ambiguity git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201258 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/CrashRecoveryContext.cpp | 2 +- lib/Support/Threading.cpp | 2 +- lib/Support/Windows/DynamicLibrary.inc | 2 +- lib/Support/Windows/Host.inc | 2 +- lib/Support/Windows/Memory.inc | 2 +- lib/Support/Windows/Mutex.inc | 2 +- lib/Support/Windows/Path.inc | 2 +- lib/Support/Windows/Process.inc | 2 +- lib/Support/Windows/Program.inc | 2 +- lib/Support/Windows/RWMutex.inc | 2 +- lib/Support/Windows/Signals.inc | 2 +- lib/Support/Windows/ThreadLocal.inc | 2 +- lib/Support/Windows/TimeValue.inc | 2 +- lib/Support/Windows/{Windows.h => WindowsSupport.h} | 7 +++++-- 14 files changed, 18 insertions(+), 15 deletions(-) rename lib/Support/Windows/{Windows.h => WindowsSupport.h} (92%) diff --git a/lib/Support/CrashRecoveryContext.cpp b/lib/Support/CrashRecoveryContext.cpp index 92c370dda44..29f73fc539c 100644 --- a/lib/Support/CrashRecoveryContext.cpp +++ b/lib/Support/CrashRecoveryContext.cpp @@ -132,7 +132,7 @@ CrashRecoveryContext::unregisterCleanup(CrashRecoveryContextCleanup *cleanup) { #ifdef LLVM_ON_WIN32 -#include "Windows/Windows.h" +#include "Windows/WindowsSupport.h" // On Windows, we can make use of vectored exception handling to // catch most crashing situations. Note that this does mean diff --git a/lib/Support/Threading.cpp b/lib/Support/Threading.cpp index 13fba2ea258..9d7ac6c18de 100644 --- a/lib/Support/Threading.cpp +++ b/lib/Support/Threading.cpp @@ -103,7 +103,7 @@ void llvm::llvm_execute_on_thread(void (*Fn)(void*), void *UserData, ::pthread_attr_destroy(&Attr); } #elif LLVM_ENABLE_THREADS!=0 && defined(LLVM_ON_WIN32) -#include "Windows/Windows.h" +#include "Windows/WindowsSupport.h" #include struct ThreadInfo { diff --git a/lib/Support/Windows/DynamicLibrary.inc b/lib/Support/Windows/DynamicLibrary.inc index 5a7b21920a9..504471eaff3 100644 --- a/lib/Support/Windows/DynamicLibrary.inc +++ b/lib/Support/Windows/DynamicLibrary.inc @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#include "Windows.h" +#include "WindowsSupport.h" #ifdef __MINGW32__ #include diff --git a/lib/Support/Windows/Host.inc b/lib/Support/Windows/Host.inc index 2e6d6f19037..7bda89dc49c 100644 --- a/lib/Support/Windows/Host.inc +++ b/lib/Support/Windows/Host.inc @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#include "Windows.h" +#include "WindowsSupport.h" #include #include diff --git a/lib/Support/Windows/Memory.inc b/lib/Support/Windows/Memory.inc index 12604524d40..ebe78782b90 100644 --- a/lib/Support/Windows/Memory.inc +++ b/lib/Support/Windows/Memory.inc @@ -17,7 +17,7 @@ #include "llvm/Support/Process.h" // The Windows.h header must be the last one included. -#include "Windows.h" +#include "WindowsSupport.h" namespace { diff --git a/lib/Support/Windows/Mutex.inc b/lib/Support/Windows/Mutex.inc index 583dc6359a1..ab79d079122 100644 --- a/lib/Support/Windows/Mutex.inc +++ b/lib/Support/Windows/Mutex.inc @@ -16,7 +16,7 @@ //=== is guaranteed to work on *all* Win32 variants. //===----------------------------------------------------------------------===// -#include "Windows.h" +#include "WindowsSupport.h" #include "llvm/Support/Mutex.h" namespace llvm { diff --git a/lib/Support/Windows/Path.inc b/lib/Support/Windows/Path.inc index 8329d271b39..46e9ce7acb2 100644 --- a/lib/Support/Windows/Path.inc +++ b/lib/Support/Windows/Path.inc @@ -24,7 +24,7 @@ // These two headers must be included last, and make sure shlobj is required // after Windows.h to make sure it picks up our definition of _WIN32_WINNT -#include "Windows.h" +#include "WindowsSupport.h" #include #undef max diff --git a/lib/Support/Windows/Process.inc b/lib/Support/Windows/Process.inc index a0e3bc413a3..a794ca08f67 100644 --- a/lib/Support/Windows/Process.inc +++ b/lib/Support/Windows/Process.inc @@ -15,7 +15,7 @@ #include // The Windows.h header must be after LLVM and standard headers. -#include "Windows.h" +#include "WindowsSupport.h" #include #include diff --git a/lib/Support/Windows/Program.inc b/lib/Support/Windows/Program.inc index dc09738e2e7..365e87eea59 100644 --- a/lib/Support/Windows/Program.inc +++ b/lib/Support/Windows/Program.inc @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#include "Windows.h" +#include "WindowsSupport.h" #include "llvm/ADT/OwningPtr.h" #include "llvm/Support/FileSystem.h" #include diff --git a/lib/Support/Windows/RWMutex.inc b/lib/Support/Windows/RWMutex.inc index c4318448e7c..00d0e93d8d5 100644 --- a/lib/Support/Windows/RWMutex.inc +++ b/lib/Support/Windows/RWMutex.inc @@ -16,7 +16,7 @@ //=== is guaranteed to work on *all* Win32 variants. //===----------------------------------------------------------------------===// -#include "Windows.h" +#include "WindowsSupport.h" namespace llvm { using namespace sys; diff --git a/lib/Support/Windows/Signals.inc b/lib/Support/Windows/Signals.inc index 5add76a0c03..a28b0b8003d 100644 --- a/lib/Support/Windows/Signals.inc +++ b/lib/Support/Windows/Signals.inc @@ -17,7 +17,7 @@ #include // The Windows.h header must be after LLVM and standard headers. -#include "Windows.h" +#include "WindowsSupport.h" #ifdef __MINGW32__ #include diff --git a/lib/Support/Windows/ThreadLocal.inc b/lib/Support/Windows/ThreadLocal.inc index 057deb325d6..3914cf72fa9 100644 --- a/lib/Support/Windows/ThreadLocal.inc +++ b/lib/Support/Windows/ThreadLocal.inc @@ -16,7 +16,7 @@ //=== is guaranteed to work on *all* Win32 variants. //===----------------------------------------------------------------------===// -#include "Windows.h" +#include "WindowsSupport.h" #include "llvm/Support/ThreadLocal.h" namespace llvm { diff --git a/lib/Support/Windows/TimeValue.inc b/lib/Support/Windows/TimeValue.inc index 98b07d6e447..6c59024d9c6 100644 --- a/lib/Support/Windows/TimeValue.inc +++ b/lib/Support/Windows/TimeValue.inc @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#include "Windows.h" +#include "WindowsSupport.h" #include #include diff --git a/lib/Support/Windows/Windows.h b/lib/Support/Windows/WindowsSupport.h similarity index 92% rename from lib/Support/Windows/Windows.h rename to lib/Support/Windows/WindowsSupport.h index 5666de267d7..6bef4444602 100644 --- a/lib/Support/Windows/Windows.h +++ b/lib/Support/Windows/WindowsSupport.h @@ -1,4 +1,4 @@ -//===- Win32/Win32.h - Common Win32 Include File ----------------*- C++ -*-===// +//===- WindowsSupport.h - Common Windows Include File -----------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -7,7 +7,10 @@ // //===----------------------------------------------------------------------===// // -// This file defines things specific to Win32 implementations. +// This file defines things specific to Windows implementations. In addition to +// providing some helpers for working with win32 APIs, this header wraps +// with some portability macros. Always include WindowsSupport.h +// instead of including directly. // //===----------------------------------------------------------------------===// -- 2.34.1