Rename Windows.h to WindowsSupport.h to avoid ambiguity
[oota-llvm.git] / lib / Support / Windows / Signals.inc
index 2b4a66d00896f636ec0e6bcd0a1b9d70208c229a..a28b0b8003d34c4310a0f6bd4ac4ff11c142935f 100644 (file)
 //===----------------------------------------------------------------------===//
 
 #include "llvm/Support/FileSystem.h"
-
-#include "Windows.h"
 #include <algorithm>
 #include <stdio.h>
 #include <vector>
 
+// The Windows.h header must be after LLVM and standard headers.
+#include "WindowsSupport.h"
+
 #ifdef __MINGW32__
  #include <imagehlp.h>
 #else
@@ -135,7 +136,7 @@ typedef PVOID (WINAPI *fpSymFunctionTableAccess64)(HANDLE, DWORD64);
 static fpSymFunctionTableAccess64 SymFunctionTableAccess64;
 
 static bool load64BitDebugHelp(void) {
-  HMODULE hLib = ::LoadLibrary(TEXT("Dbghelp.dll"));
+  HMODULE hLib = ::LoadLibraryW(L"Dbghelp.dll");
   if (hLib) {
     StackWalk64 = (fpStackWalk64)
                       ::GetProcAddress(hLib, "StackWalk64");