[clang][deps] NFC: Remove unused FullDependencies member
authorJan Svoboda <jan_svoboda@apple.com>
Mon, 19 Apr 2021 12:34:10 +0000 (14:34 +0200)
committerJan Svoboda <jan_svoboda@apple.com>
Mon, 19 Apr 2021 13:02:54 +0000 (15:02 +0200)
This patch removes the `FullDependencies::AdditionalNonPathCommandLine` member, as it's value-initialized and never mutated.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D100536

clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h
clang/lib/Tooling/DependencyScanning/DependencyScanningTool.cpp

index 09c3857..33e155f 100644 (file)
@@ -38,13 +38,6 @@ struct FullDependencies {
   /// determined that the differences are benign for this compilation.
   std::vector<ModuleID> ClangModuleDeps;
 
-  /// A partial addtional set of command line arguments that can be used to
-  /// build this translation unit.
-  ///
-  /// Call \c getFullAdditionalCommandLine() to get a command line suitable for
-  /// appending to the original command line to pass to clang.
-  std::vector<std::string> AdditionalNonPathCommandLine;
-
   /// Get additional arguments suitable for appending to the original Clang
   /// command line.
   ///
index afb3ceb..a59ab68 100644 (file)
@@ -16,10 +16,10 @@ namespace dependencies{
 std::vector<std::string> FullDependencies::getAdditionalCommandLine(
     std::function<StringRef(ModuleID)> LookupPCMPath,
     std::function<const ModuleDeps &(ModuleID)> LookupModuleDeps) const {
-  std::vector<std::string> Ret = AdditionalNonPathCommandLine;
-
-  Ret.push_back("-fno-implicit-modules");
-  Ret.push_back("-fno-implicit-module-maps");
+  std::vector<std::string> Ret{
+      "-fno-implicit-modules",
+      "-fno-implicit-module-maps",
+  };
 
   std::vector<std::string> PCMPaths;
   std::vector<std::string> ModMapPaths;