[clang] 95588c0 - [clang][deps] NFC: Remove unused FullDependencies member

Jan Svoboda via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 19 06:03:00 PDT 2021


Author: Jan Svoboda
Date: 2021-04-19T15:02:54+02:00
New Revision: 95588c0da4ef08d8e497f7e4b094d96f6c38c3e5

URL: https://github.com/llvm/llvm-project/commit/95588c0da4ef08d8e497f7e4b094d96f6c38c3e5
DIFF: https://github.com/llvm/llvm-project/commit/95588c0da4ef08d8e497f7e4b094d96f6c38c3e5.diff

LOG: [clang][deps] NFC: Remove unused FullDependencies member

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

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h b/clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h
index 09c385783c52..33e155f4b4ae 100644
--- a/clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h
+++ b/clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h
@@ -38,13 +38,6 @@ struct FullDependencies {
   /// determined that the 
diff erences 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.
   ///

diff  --git a/clang/lib/Tooling/DependencyScanning/DependencyScanningTool.cpp b/clang/lib/Tooling/DependencyScanning/DependencyScanningTool.cpp
index afb3ceb0ca54..a59ab688b10b 100644
--- a/clang/lib/Tooling/DependencyScanning/DependencyScanningTool.cpp
+++ b/clang/lib/Tooling/DependencyScanning/DependencyScanningTool.cpp
@@ -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;


        


More information about the cfe-commits mailing list