Remove useless 'llvm::' qualifier from names like StringRef and others that are
brought into 'clang' namespace by clang/Basic/LLVM.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172323 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Frontend/ASTConsumers.cpp b/lib/Frontend/ASTConsumers.cpp
index 0fdd57d..687fc00 100644
--- a/lib/Frontend/ASTConsumers.cpp
+++ b/lib/Frontend/ASTConsumers.cpp
@@ -61,7 +61,7 @@
       if (D != NULL && filterMatches(D)) {
         bool ShowColors = Out.has_colors();
         if (ShowColors)
-          Out.changeColor(llvm::raw_ostream::BLUE);
+          Out.changeColor(raw_ostream::BLUE);
         Out << (Dump ? "Dumping " : "Printing ") << getName(D) << ":\n";
         if (ShowColors)
           Out.resetColor();
diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp
index 35a9aa4..a958fd9 100644
--- a/lib/Frontend/ASTUnit.cpp
+++ b/lib/Frontend/ASTUnit.cpp
@@ -155,7 +155,7 @@
   }
 }
 
-static void setPreambleFile(const ASTUnit *AU, llvm::StringRef preambleFile) {
+static void setPreambleFile(const ASTUnit *AU, StringRef preambleFile) {
   getOnDiskData(AU).PreambleFile = preambleFile;
 }
 
diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp
index 5b2be91..057adbd 100644
--- a/lib/Frontend/CompilerInstance.cpp
+++ b/lib/Frontend/CompilerInstance.cpp
@@ -1108,7 +1108,7 @@
       
       if (!Sub) {
         // Attempt to perform typo correction to find a module name that works.
-        llvm::SmallVector<StringRef, 2> Best;
+        SmallVector<StringRef, 2> Best;
         unsigned BestEditDistance = (std::numeric_limits<unsigned>::max)();
         
         for (clang::Module::submodule_iterator J = Module->submodule_begin(), 
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp
index 8cb1d16..0f00c07 100644
--- a/lib/Frontend/CompilerInvocation.cpp
+++ b/lib/Frontend/CompilerInvocation.cpp
@@ -70,7 +70,7 @@
 
     assert (A->getOption().matches(options::OPT_O));
 
-    llvm::StringRef S(A->getValue());
+    StringRef S(A->getValue());
     if (S == "s" || S == "z" || S.empty())
       return 2;
 
@@ -1495,7 +1495,7 @@
 namespace {
 
   class ModuleSignature {
-    llvm::SmallVector<uint64_t, 16> Data;
+    SmallVector<uint64_t, 16> Data;
     unsigned CurBit;
     uint64_t CurValue;
     
diff --git a/lib/Frontend/DependencyGraph.cpp b/lib/Frontend/DependencyGraph.cpp
index 0ecea6f..e128d91 100644
--- a/lib/Frontend/DependencyGraph.cpp
+++ b/lib/Frontend/DependencyGraph.cpp
@@ -31,15 +31,14 @@
   std::string OutputFile;
   std::string SysRoot;
   llvm::SetVector<const FileEntry *> AllFiles;
-  typedef llvm::DenseMap<const FileEntry *, 
-                         llvm::SmallVector<const FileEntry *, 2> >
-    DependencyMap;
+  typedef llvm::DenseMap<const FileEntry *,
+                         SmallVector<const FileEntry *, 2> > DependencyMap;
   
   DependencyMap Dependencies;
   
 private:
-  llvm::raw_ostream &writeNodeReference(llvm::raw_ostream &OS,
-                                        const FileEntry *Node);
+  raw_ostream &writeNodeReference(raw_ostream &OS,
+                                  const FileEntry *Node);
   void OutputGraphFile();
 
 public:
@@ -93,8 +92,8 @@
   AllFiles.insert(FromFile);
 }
 
-llvm::raw_ostream &
-DependencyGraphCallback::writeNodeReference(llvm::raw_ostream &OS,
+raw_ostream &
+DependencyGraphCallback::writeNodeReference(raw_ostream &OS,
                                             const FileEntry *Node) {
   OS << "header_" << Node->getUID();
   return OS;
diff --git a/lib/Frontend/DiagnosticRenderer.cpp b/lib/Frontend/DiagnosticRenderer.cpp
index e5ac042..3b4f55c 100644
--- a/lib/Frontend/DiagnosticRenderer.cpp
+++ b/lib/Frontend/DiagnosticRenderer.cpp
@@ -139,7 +139,7 @@
     SmallVector<CharSourceRange, 20> MutableRanges(Ranges.begin(),
                                                    Ranges.end());
 
-    llvm::SmallVector<FixItHint, 8> MergedFixits;
+    SmallVector<FixItHint, 8> MergedFixits;
     if (!FixItHints.empty()) {
       mergeFixits(FixItHints, *SM, LangOpts, MergedFixits);
       FixItHints = MergedFixits;
diff --git a/lib/Frontend/LayoutOverrideSource.cpp b/lib/Frontend/LayoutOverrideSource.cpp
index e023250..9309661 100644
--- a/lib/Frontend/LayoutOverrideSource.cpp
+++ b/lib/Frontend/LayoutOverrideSource.cpp
@@ -26,7 +26,7 @@
   return S.substr(0, Offset).str();
 }
 
-LayoutOverrideSource::LayoutOverrideSource(llvm::StringRef Filename) {
+LayoutOverrideSource::LayoutOverrideSource(StringRef Filename) {
   std::ifstream Input(Filename.str().c_str());
   if (!Input.is_open())
     return;
@@ -188,7 +188,7 @@
 }
 
 void LayoutOverrideSource::dump() {
-  llvm::raw_ostream &OS = llvm::errs();
+  raw_ostream &OS = llvm::errs();
   for (llvm::StringMap<Layout>::iterator L = Layouts.begin(), 
                                       LEnd = Layouts.end();
        L != LEnd; ++L) {
diff --git a/lib/Frontend/SerializedDiagnosticPrinter.cpp b/lib/Frontend/SerializedDiagnosticPrinter.cpp
index 26915e5..8eb0e40 100644
--- a/lib/Frontend/SerializedDiagnosticPrinter.cpp
+++ b/lib/Frontend/SerializedDiagnosticPrinter.cpp
@@ -44,8 +44,8 @@
   }
 };
  
-typedef llvm::SmallVector<uint64_t, 64> RecordData;
-typedef llvm::SmallVectorImpl<uint64_t> RecordDataImpl;
+typedef SmallVector<uint64_t, 64> RecordData;
+typedef SmallVectorImpl<uint64_t> RecordDataImpl;
 
 class SDiagsWriter;
   
@@ -92,11 +92,11 @@
 
   struct SharedState;
 
-  explicit SDiagsWriter(llvm::IntrusiveRefCntPtr<SharedState> State)
+  explicit SDiagsWriter(IntrusiveRefCntPtr<SharedState> State)
     : LangOpts(0), OriginalInstance(false), State(State) { }
 
 public:
-  SDiagsWriter(llvm::raw_ostream *os, DiagnosticOptions *diags)
+  SDiagsWriter(raw_ostream *os, DiagnosticOptions *diags)
     : LangOpts(0), OriginalInstance(true), State(new SharedState(os, diags))
   {
     EmitPreamble();
@@ -190,12 +190,12 @@
 
   /// \brief State that is shared among the various clones of this diagnostic
   /// consumer.
-  struct SharedState : llvm::RefCountedBase<SharedState> {
-    SharedState(llvm::raw_ostream *os, DiagnosticOptions *diags)
+  struct SharedState : RefCountedBase<SharedState> {
+    SharedState(raw_ostream *os, DiagnosticOptions *diags)
       : DiagOpts(diags), Stream(Buffer), OS(os), EmittedAnyDiagBlocks(false) { }
 
     /// \brief Diagnostic options.
-    llvm::IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts;
+    IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts;
 
     /// \brief The byte buffer for the serialized content.
     SmallString<1024> Buffer;
@@ -204,7 +204,7 @@
     llvm::BitstreamWriter Stream;
 
     /// \brief The name of the diagnostics file.
-    OwningPtr<llvm::raw_ostream> OS;
+    OwningPtr<raw_ostream> OS;
 
     /// \brief The set of constructed record abbreviations.
     AbbreviationMap Abbrevs;
@@ -221,7 +221,7 @@
     /// \brief The collection of files used.
     llvm::DenseMap<const char *, unsigned> Files;
 
-    typedef llvm::DenseMap<const void *, std::pair<unsigned, llvm::StringRef> >
+    typedef llvm::DenseMap<const void *, std::pair<unsigned, StringRef> >
     DiagFlagsTy;
 
     /// \brief Map for uniquing strings.
@@ -234,14 +234,13 @@
   };
 
   /// \brief State shared among the various clones of this diagnostic consumer.
-  llvm::IntrusiveRefCntPtr<SharedState> State;
+  IntrusiveRefCntPtr<SharedState> State;
 };
 } // end anonymous namespace
 
 namespace clang {
 namespace serialized_diags {
-DiagnosticConsumer *create(llvm::raw_ostream *OS,
-                           DiagnosticOptions *diags) {
+DiagnosticConsumer *create(raw_ostream *OS, DiagnosticOptions *diags) {
   return new SDiagsWriter(OS, diags);
 }
 } // end namespace serialized_diags
diff --git a/lib/Frontend/Warnings.cpp b/lib/Frontend/Warnings.cpp
index 0d678ad..b4c6b0b 100644
--- a/lib/Frontend/Warnings.cpp
+++ b/lib/Frontend/Warnings.cpp
@@ -75,7 +75,7 @@
   else
     Diags.setExtensionHandlingBehavior(DiagnosticsEngine::Ext_Ignore);
 
-  llvm::SmallVector<diag::kind, 10> _Diags;
+  SmallVector<diag::kind, 10> _Diags;
   const IntrusiveRefCntPtr< DiagnosticIDs > DiagIDs =
     Diags.getDiagnosticIDs();
   // We parse the warning options twice.  The first pass sets diagnostic state,