-Make IndexProvider an abstract interface for getting indexing information.
-Introduce Indexer as an IndexProvider implementation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77524 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/index-test/index-test.cpp b/tools/index-test/index-test.cpp
index 4516e31..a88d270 100644
--- a/tools/index-test/index-test.cpp
+++ b/tools/index-test/index-test.cpp
@@ -33,7 +33,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "clang/Index/Program.h"
-#include "clang/Index/IndexProvider.h"
+#include "clang/Index/Indexer.h"
 #include "clang/Index/Entity.h"
 #include "clang/Index/TranslationUnit.h"
 #include "clang/Index/ASTLocation.h"
@@ -141,7 +141,7 @@
   }
 }
 
-static void ProcessASTLocation(ASTLocation ASTLoc, IndexProvider &IdxProvider) {
+static void ProcessASTLocation(ASTLocation ASTLoc, Indexer &Idxer) {
   assert(ASTLoc.isValid());
 
   Decl *D = ASTLoc.getReferencedDecl();
@@ -151,14 +151,14 @@
     return;
   }
 
-  Entity Ent = Entity::get(D, IdxProvider.getProgram());
+  Entity Ent = Entity::get(D, Idxer.getProgram());
   if (Ent.isInvalid() || Ent.isInternalToTU())
     return ProcessDecl(D);
 
   // Find the "same" Decl in other translation units and print information.
-  for (IndexProvider::translation_unit_iterator
-         I = IdxProvider.translation_units_begin(Ent),
-         E = IdxProvider.translation_units_end(Ent); I != E; ++I) {
+  for (Indexer::translation_unit_iterator
+         I = Idxer.translation_units_begin(Ent),
+         E = Idxer.translation_units_end(Ent); I != E; ++I) {
     TUnit *TU = static_cast<TUnit*>(*I);
     Decl *OtherD = Ent.getDecl(TU->getASTContext());
     assert(OtherD && "Couldn't resolve Entity");
@@ -178,7 +178,7 @@
   FileManager FileMgr;
 
   Program Prog;
-  IndexProvider IdxProvider(Prog);
+  Indexer Idxer(Prog);
   llvm::SmallVector<TUnit*, 4> TUnits;
   
   // If no input was specified, read from stdin.
@@ -200,7 +200,7 @@
     TUnit *TU = new TUnit(AST.take(), InFile);
     TUnits.push_back(TU);
     
-    IdxProvider.IndexAST(TU);
+    Idxer.IndexAST(TU);
   }
 
   ASTLocation ASTLoc;
@@ -253,7 +253,7 @@
             FirstAST->getASTContext().getCommentForDecl(ASTLoc.getDecl()))
         OS << "Comment associated with this declaration:\n" << Comment << "\n";
     } else {
-      ProcessASTLocation(ASTLoc, IdxProvider);
+      ProcessASTLocation(ASTLoc, Idxer);
     }
   }