//===----------------------------------------------------------------------===//
#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
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");