[lld] r281801 - Remove unnecessary namespace specifiers.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 16 19:10:15 PDT 2016


Author: ruiu
Date: Fri Sep 16 21:10:15 2016
New Revision: 281801

URL: http://llvm.org/viewvc/llvm-project?rev=281801&view=rev
Log:
Remove unnecessary namespace specifiers.

Modified:
    lld/trunk/ELF/LinkerScript.cpp

Modified: lld/trunk/ELF/LinkerScript.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.cpp?rev=281801&r1=281800&r2=281801&view=diff
==============================================================================
--- lld/trunk/ELF/LinkerScript.cpp (original)
+++ lld/trunk/ELF/LinkerScript.cpp Fri Sep 16 21:10:15 2016
@@ -109,8 +109,8 @@ bool LinkerScript<ELFT>::shouldKeep(Inpu
   return false;
 }
 
-static bool fileMatches(const llvm::Regex &FileRe,
-                        const llvm::Regex &ExcludedFileRe, StringRef Filename) {
+static bool fileMatches(const Regex &FileRe, const Regex &ExcludedFileRe,
+                        StringRef Filename) {
   return const_cast<Regex &>(FileRe).match(Filename) &&
          !const_cast<Regex &>(ExcludedFileRe).match(Filename);
 }
@@ -165,7 +165,7 @@ static bool matchConstraints(ArrayRef<In
 // Compute and remember which sections the InputSectionDescription matches.
 template <class ELFT>
 void LinkerScript<ELFT>::computeInputSections(InputSectionDescription *I) {
-  for (const std::pair<llvm::Regex, llvm::Regex> &V : I->SectionsVec) {
+  for (const std::pair<Regex, Regex> &V : I->SectionsVec) {
     for (ObjectFile<ELFT> *F : Symtab<ELFT>::X->getObjectFiles()) {
       if (fileMatches(I->FileRe, V.first, sys::path::filename(F->getName()))) {
         Regex &Re = const_cast<Regex &>(V.second);
@@ -1062,7 +1062,7 @@ static void selectSortKind(InputSectionD
 // a following form: ((EXCLUDE_FILE(file_pattern+))? section_pattern+)+
 // Example: *(.foo.1 EXCLUDE_FILE (*a.o) .foo.2 EXCLUDE_FILE (*b.o) .foo.3)
 void ScriptParser::readSectionExcludes(InputSectionDescription *Cmd) {
-  llvm::Regex ExcludeFileRe;
+  Regex ExcludeFileRe;
   std::vector<StringRef> V;
 
   while (!Error) {
@@ -1102,10 +1102,10 @@ ScriptParser::readInputSectionRules(Stri
     if (K2 != SortSectionPolicy::Default) {
       Cmd->SortInner = K2;
       expect("(");
-      Cmd->SectionsVec.push_back({llvm::Regex(), readFilePatterns()});
+      Cmd->SectionsVec.push_back({Regex(), readFilePatterns()});
       expect(")");
     } else {
-      Cmd->SectionsVec.push_back({llvm::Regex(), readFilePatterns()});
+      Cmd->SectionsVec.push_back({Regex(), readFilePatterns()});
     }
     expect(")");
     selectSortKind(Cmd);
@@ -1126,7 +1126,7 @@ ScriptParser::readInputSectionDescriptio
     StringRef FilePattern = next();
     InputSectionDescription *Cmd = readInputSectionRules(FilePattern);
     expect(")");
-    for (std::pair<llvm::Regex, llvm::Regex> &Regex : Cmd->SectionsVec)
+    for (std::pair<Regex, Regex> &Regex : Cmd->SectionsVec)
       Opt.KeptSections.push_back(&Regex.second);
     return Cmd;
   }




More information about the llvm-commits mailing list