[lld] f06d487 - Cleanup includes: WindowsDriver & WindowsManifest
via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 10 08:19:46 PST 2022
Author: serge-sans-paille
Date: 2022-03-10T17:19:06+01:00
New Revision: f06d487dd68b6fa103b5ffd072e17e24041f1983
URL: https://github.com/llvm/llvm-project/commit/f06d487dd68b6fa103b5ffd072e17e24041f1983
DIFF: https://github.com/llvm/llvm-project/commit/f06d487dd68b6fa103b5ffd072e17e24041f1983.diff
LOG: Cleanup includes: WindowsDriver & WindowsManifest
Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup
Differential Revision: https://reviews.llvm.org/D121330
Added:
Modified:
lld/COFF/Driver.cpp
llvm/include/llvm/WindowsDriver/MSVCPaths.h
llvm/lib/WindowsDriver/MSVCPaths.cpp
llvm/lib/WindowsManifest/WindowsManifestMerger.cpp
Removed:
################################################################################
diff --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp
index 09e6ee2f18d64..f7fd932c8bee1 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 <algorithm>
diff --git a/llvm/include/llvm/WindowsDriver/MSVCPaths.h b/llvm/include/llvm/WindowsDriver/MSVCPaths.h
index f2a28513932a3..7256a4f66eaab 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 <string>
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 23d67378a22e1..46a4426b38b4d 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 <string>
+#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 0e58b0af6bbf2..8f5c53faf91e2 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 <map>
-
#if LLVM_ENABLE_LIBXML2
#include <libxml/xmlreader.h>
#endif
More information about the llvm-commits
mailing list