Make helpers static. clang-tools edition.

Also purge dead code found by it. NFC.

llvm-svn: 232948
diff --git a/clang-tools-extra/modularize/Modularize.cpp b/clang-tools-extra/modularize/Modularize.cpp
index f113398..38f1f1a 100644
--- a/clang-tools-extra/modularize/Modularize.cpp
+++ b/clang-tools-extra/modularize/Modularize.cpp
@@ -252,18 +252,18 @@
 using namespace Modularize;
 
 // Option to specify a file name for a list of header files to check.
-cl::list<std::string>

-ListFileNames(cl::Positional, cl::value_desc("list"),

-              cl::desc("<list of one or more header list files>"),

-              cl::CommaSeparated);

+static cl::list<std::string>
+    ListFileNames(cl::Positional, cl::value_desc("list"),
+                  cl::desc("<list of one or more header list files>"),
+                  cl::CommaSeparated);
 
 // Collect all other arguments, which will be passed to the front end.
-cl::list<std::string>
-CC1Arguments(cl::ConsumeAfter,
-             cl::desc("<arguments to be passed to front end>..."));
+static cl::list<std::string>
+    CC1Arguments(cl::ConsumeAfter,
+                 cl::desc("<arguments to be passed to front end>..."));
 
 // Option to specify a prefix to be prepended to the header names.
-cl::opt<std::string> HeaderPrefix(
+static cl::opt<std::string> HeaderPrefix(
     "prefix", cl::init(""),
     cl::desc(
         "Prepend header file paths with this prefix."
@@ -272,7 +272,7 @@
 
 // Option for assistant mode, telling modularize to output a module map
 // based on the headers list, and where to put it.
-cl::opt<std::string> ModuleMapPath(
+static cl::opt<std::string> ModuleMapPath(
     "module-map-path", cl::init(""),
     cl::desc("Turn on module map output and specify output path or file name."
              " If no path is specified and if prefix option is specified,"
@@ -280,7 +280,7 @@
 
 // Option for assistant mode, telling modularize to output a module map
 // based on the headers list, and where to put it.
-cl::opt<std::string>
+static cl::opt<std::string>
 RootModule("root-module", cl::init(""),
            cl::desc("Specify the name of the root module."));
 
@@ -314,7 +314,7 @@
 std::string CommandLine;
 
 // Helper function for finding the input file in an arguments list.
-std::string findInputFile(const CommandLineArguments &CLArgs) {
+static std::string findInputFile(const CommandLineArguments &CLArgs) {
   std::unique_ptr<OptTable> Opts(createDriverOptTable());
   const unsigned IncludedFlagsBitmask = options::CC1Option;
   unsigned MissingArgIndex, MissingArgCount;
@@ -332,7 +332,8 @@
 
 // This arguments adjuster inserts "-include (file)" arguments for header
 // dependencies.
-ArgumentsAdjuster getAddDependenciesAdjuster(DependencyMap &Dependencies) {
+static ArgumentsAdjuster
+getAddDependenciesAdjuster(DependencyMap &Dependencies) {
   return [&Dependencies](const CommandLineArguments &Args) {
     std::string InputFile = findInputFile(Args);
     DependentsVector &FileDependents = Dependencies[InputFile];