[PATCH] D100536: [clang][deps] NFC: Remove unused FullDependencies member

Jan Svoboda via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 15 01:25:59 PDT 2021


jansvoboda11 created this revision.
jansvoboda11 added reviewers: Bigcheese, dexonsmith.
jansvoboda11 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

This patch removes the `FullDependencies::AdditionalNonPathCommandLine` member, as it's value-initialized and never mutated.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D100536

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


Index: clang/lib/Tooling/DependencyScanning/DependencyScanningTool.cpp
===================================================================
--- clang/lib/Tooling/DependencyScanning/DependencyScanningTool.cpp
+++ clang/lib/Tooling/DependencyScanning/DependencyScanningTool.cpp
@@ -16,10 +16,10 @@
 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;
Index: clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h
===================================================================
--- clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h
+++ clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h
@@ -38,13 +38,6 @@
   /// 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;
-
   /// Gets the full addtional command line suitable for appending to the
   /// original command line to pass to clang.
   ///


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100536.337660.patch
Type: text/x-patch
Size: 1726 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210415/d28f42bd/attachment-0001.bin>


More information about the cfe-commits mailing list