Pruned some unneeded code and comments.
authorJohn Thompson <John.Thompson.JTSoftware@gmail.com>
Thu, 19 Feb 2015 14:31:48 +0000 (14:31 +0000)
committerJohn Thompson <John.Thompson.JTSoftware@gmail.com>
Thu, 19 Feb 2015 14:31:48 +0000 (14:31 +0000)
llvm-svn: 229855

clang-tools-extra/modularize/ModularizeUtilities.cpp
clang-tools-extra/modularize/ModularizeUtilities.h

index 03328c8..afc03d4 100644 (file)
@@ -214,7 +214,7 @@ std::error_code ModularizeUtilities::loadModuleMap(
 
 // Collect module map headers.
 // Walks the modules and collects referenced headers into
-// ModuleMapHeadersSet.
+// HeaderFileNames.
 bool ModularizeUtilities::collectModuleMapHeaders(clang::ModuleMap *ModMap) {
   for (ModuleMap::module_iterator I = ModMap->module_begin(),
     E = ModMap->module_end();
@@ -227,7 +227,7 @@ bool ModularizeUtilities::collectModuleMapHeaders(clang::ModuleMap *ModMap) {
 
 // Collect referenced headers from one module.
 // Collects the headers referenced in the given module into
-// HeaderFileNames and ModuleMapHeadersSet.
+// HeaderFileNames.
 bool ModularizeUtilities::collectModuleHeaders(const Module &Mod) {
 
   // Ignore explicit modules because they often have dependencies
@@ -248,7 +248,6 @@ bool ModularizeUtilities::collectModuleHeaders(const Module &Mod) {
     std::string HeaderPath = getCanonicalPath(UmbrellaHeader->getName());
     // Collect umbrella header.
     HeaderFileNames.push_back(HeaderPath);
-    ModuleMapHeadersSet.insert(HeaderPath);
 
     // FUTURE: When needed, umbrella header header collection goes here.
   }
@@ -306,7 +305,6 @@ bool ModularizeUtilities::collectUmbrellaHeaders(StringRef UmbrellaDirName,
       continue;
     // Save header name.
     std::string HeaderPath = getCanonicalPath(File);
-    ModuleMapHeadersSet.insert(HeaderPath);
     Dependents.push_back(HeaderPath);
   }
   return true;
index e40493c..31f76d0 100644 (file)
@@ -50,8 +50,6 @@ public:
   llvm::SmallVector<std::string, 32> HeaderFileNames;
   /// Map of top-level header file dependencies.
   DependencyMap Dependencies;
-  /// Set of all the headers found in the module map.
-  llvm::StringSet<llvm::MallocAllocator> ModuleMapHeadersSet;
 
   // Functions.
 
@@ -93,14 +91,14 @@ protected:
 
   /// Collect module Map headers.
   /// Walks the modules and collects referenced headers into
-  /// ModuleMapHeadersSet.
+  /// HeaderFileNames.
   /// \param ModMap A loaded module map object.
   /// \return True if no errors.
   bool collectModuleMapHeaders(clang::ModuleMap *ModMap);
 
   /// Collect referenced headers from one module.
   /// Collects the headers referenced in the given module into
-  /// HeaderFileNames and ModuleMapHeadersSet.
+  /// HeaderFileNames.
   /// \param Mod The module reference.
   /// \return True if no errors.
   bool collectModuleHeaders(const clang::Module &Mod);