diff --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp index 09e6ee2f18d6..f7fd932c8bee 100644 --- a/lld/COFF/Driver.cpp +++ b/lld/COFF/Driver.cpp @@ -22,6 +22,7 @@ #include "lld/Common/Filesystem.h" #include "lld/Common/Timer.h" #include "lld/Common/Version.h" +#include "llvm/ADT/IntrusiveRefCntPtr.h" #include "llvm/ADT/Optional.h" #include "llvm/ADT/StringSwitch.h" #include "llvm/ADT/Triple.h" @@ -45,6 +46,7 @@ #include "llvm/Support/Process.h" #include "llvm/Support/TarWriter.h" #include "llvm/Support/TargetSelect.h" +#include "llvm/Support/VirtualFileSystem.h" #include "llvm/Support/raw_ostream.h" #include "llvm/ToolDrivers/llvm-lib/LibDriver.h" #include diff --git a/llvm/include/llvm/WindowsDriver/MSVCPaths.h b/llvm/include/llvm/WindowsDriver/MSVCPaths.h index f2a28513932a..7256a4f66eaa 100644 --- a/llvm/include/llvm/WindowsDriver/MSVCPaths.h +++ b/llvm/include/llvm/WindowsDriver/MSVCPaths.h @@ -10,14 +10,17 @@ #define LLVM_SUPPORT_MSVCPATHS_H #include "llvm/ADT/Optional.h" +#include "llvm/ADT/SmallString.h" #include "llvm/ADT/StringRef.h" #include "llvm/ADT/Triple.h" -#include "llvm/Option/ArgList.h" -#include "llvm/Support/VirtualFileSystem.h" #include namespace llvm { +namespace vfs { +class FileSystem; +} + enum class SubDirectoryType { Bin, Include, diff --git a/llvm/lib/WindowsDriver/MSVCPaths.cpp b/llvm/lib/WindowsDriver/MSVCPaths.cpp index 23d67378a22e..46a4426b38b4 100644 --- a/llvm/lib/WindowsDriver/MSVCPaths.cpp +++ b/llvm/lib/WindowsDriver/MSVCPaths.cpp @@ -10,13 +10,9 @@ #include "llvm/ADT/Optional.h" #include "llvm/ADT/SmallString.h" #include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringRef.h" #include "llvm/ADT/Triple.h" #include "llvm/ADT/Twine.h" -#include "llvm/Option/Arg.h" -#include "llvm/Option/ArgList.h" -#include "llvm/Support/ConvertUTF.h" #include "llvm/Support/Host.h" #include "llvm/Support/Path.h" #include "llvm/Support/Process.h" @@ -25,6 +21,10 @@ #include "llvm/Support/VirtualFileSystem.h" #include +#ifdef _WIN32 +#include "llvm/Support/ConvertUTF.h" +#endif + #ifdef _WIN32 #define WIN32_LEAN_AND_MEAN #define NOGDI diff --git a/llvm/lib/WindowsManifest/WindowsManifestMerger.cpp b/llvm/lib/WindowsManifest/WindowsManifestMerger.cpp index 0e58b0af6bbf..8f5c53faf91e 100644 --- a/llvm/lib/WindowsManifest/WindowsManifestMerger.cpp +++ b/llvm/lib/WindowsManifest/WindowsManifestMerger.cpp @@ -14,8 +14,6 @@ #include "llvm/Config/config.h" #include "llvm/Support/MemoryBuffer.h" -#include - #if LLVM_ENABLE_LIBXML2 #include #endif