Make a few definitions static. NFC.
authorRafael Espindola <rafael.espindola@gmail.com>
Sun, 1 Nov 2015 00:14:59 +0000 (00:14 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Sun, 1 Nov 2015 00:14:59 +0000 (00:14 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251759 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-ar/llvm-ar.cpp

index b63856b9f7f7d3e93c2bf9dc5e420f0c9f8a308b..42c95814ae67698fe827a2e9d69aac97ca02b72c 100644 (file)
@@ -81,7 +81,7 @@ static cl::opt<Format>
                          clEnumValN(GNU, "gnu", "gnu"),
                          clEnumValN(BSD, "bsd", "bsd"), clEnumValEnd));
 
                          clEnumValN(GNU, "gnu", "gnu"),
                          clEnumValN(BSD, "bsd", "bsd"), clEnumValEnd));
 
-std::string Options;
+static std::string Options;
 
 // Provide additional help output explaining the operations and modifiers of
 // llvm-ar. This object instructs the CommandLine library to print the text of
 
 // Provide additional help output explaining the operations and modifiers of
 // llvm-ar. This object instructs the CommandLine library to print the text of
@@ -436,8 +436,8 @@ static void performReadOperation(ArchiveOperation Operation,
   std::exit(1);
 }
 
   std::exit(1);
 }
 
-void addMember(std::vector<NewArchiveIterator> &Members, StringRef FileName,
-               int Pos = -1) {
+static void addMember(std::vector<NewArchiveIterator> &Members,
+                      StringRef FileName, int Pos = -1) {
   NewArchiveIterator NI(FileName);
   if (Pos == -1)
     Members.push_back(NI);
   NewArchiveIterator NI(FileName);
   if (Pos == -1)
     Members.push_back(NI);
@@ -445,8 +445,9 @@ void addMember(std::vector<NewArchiveIterator> &Members, StringRef FileName,
     Members[Pos] = NI;
 }
 
     Members[Pos] = NI;
 }
 
-void addMember(std::vector<NewArchiveIterator> &Members,
-               const object::Archive::Child &M, StringRef Name, int Pos = -1) {
+static void addMember(std::vector<NewArchiveIterator> &Members,
+                      const object::Archive::Child &M, StringRef Name,
+                      int Pos = -1) {
   if (Thin && !M.getParent()->isThin())
     fail("Cannot convert a regular archive to a thin one");
   NewArchiveIterator NI(M, Name);
   if (Thin && !M.getParent()->isThin())
     fail("Cannot convert a regular archive to a thin one");
   NewArchiveIterator NI(M, Name);