diff options
| author | NAKAMURA Takumi <geek4civic@gmail.com> | 2014-02-12 11:50:22 +0000 |
|---|---|---|
| committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2014-02-12 11:50:22 +0000 |
| commit | 04d39d7a2ddb5ebaf35f1ce3acf11dd1730fc548 (patch) | |
| tree | b532abcc23aae1e03f8d4750bf48121fc18fce67 /llvm/lib/Support/Windows | |
| parent | 04817e49bce9b7f46aa29aea96239ded3839660f (diff) | |
| download | bcm5719-llvm-04d39d7a2ddb5ebaf35f1ce3acf11dd1730fc548.tar.gz bcm5719-llvm-04d39d7a2ddb5ebaf35f1ce3acf11dd1730fc548.zip | |
Windows/Path.inc: Move <shlobj.h> after "Windows.h" for some API available.
I found that swapping the order of some header files helped fix a
build issue that we're seeing on mingw32. Without the swap, windows.h
was being included before _WIN32_WINNT was being defined and the
CreateHardLinkW function was #ifdef'd out.
It looks like the header is mainly used to get the SHGetFolderPathW
function, so I don't think that there'll be much fallout from the
switch.
Suggested by Alex Crichton. Thanks!
llvm-svn: 201230
Diffstat (limited to 'llvm/lib/Support/Windows')
| -rw-r--r-- | llvm/lib/Support/Windows/Path.inc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Support/Windows/Path.inc b/llvm/lib/Support/Windows/Path.inc index a431fa04806..8329d271b39 100644 --- a/llvm/lib/Support/Windows/Path.inc +++ b/llvm/lib/Support/Windows/Path.inc @@ -19,12 +19,13 @@ #include "llvm/ADT/STLExtras.h" #include <fcntl.h> #include <io.h> -#include <shlobj.h> #include <sys/stat.h> #include <sys/types.h> -// The Windows.h header must be the last one included. +// 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 <shlobj.h> #undef max |

