Windows/Path.inc: Move <shlobj.h> after "Windows.h" for some API available.
[oota-llvm.git] / lib / Support / Windows / Signals.inc
index 2b4a66d00896f636ec0e6bcd0a1b9d70208c229a..5add76a0c03b5967ba34bfa07a795aef5774b6a5 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 "Windows.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");