Move ASTLocation and DeclReferenceMap from the AST library to the Index library.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74859 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Frontend/ResolveLocation.cpp b/lib/Frontend/ResolveLocation.cpp
index c2d32bb..9fbae30 100644
--- a/lib/Frontend/ResolveLocation.cpp
+++ b/lib/Frontend/ResolveLocation.cpp
@@ -13,13 +13,14 @@
 //===----------------------------------------------------------------------===//
 
 #include "clang/Frontend/Utils.h"
-#include "clang/AST/ASTLocation.h"
+#include "clang/Index/ASTLocation.h"
 #include "clang/AST/DeclVisitor.h"
 #include "clang/AST/StmtVisitor.h"
 #include "clang/Lex/Lexer.h"
 #include "clang/Basic/SourceManager.h"
 #include "llvm/Support/Compiler.h"
 using namespace clang;
+using namespace idx;
 
 namespace {
 
diff --git a/lib/AST/ASTLocation.cpp b/lib/Index/ASTLocation.cpp
similarity index 95%
rename from lib/AST/ASTLocation.cpp
rename to lib/Index/ASTLocation.cpp
index e72acf0..4b95d9d 100644
--- a/lib/AST/ASTLocation.cpp
+++ b/lib/Index/ASTLocation.cpp
@@ -1,4 +1,4 @@
-//===--- ASTLocation.h - A <Decl, Stmt> pair --------------------*- C++ -*-===//
+//===--- ASTLocation.cpp - A <Decl, Stmt> pair ------------------*- C++ -*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -11,11 +11,12 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "clang/AST/ASTLocation.h"
+#include "clang/Index/ASTLocation.h"
 #include "clang/AST/Decl.h"
 #include "clang/AST/Stmt.h"
 #include "clang/AST/Expr.h"
 using namespace clang;
+using namespace idx;
 
 static bool isContainedInStatement(Stmt *Node, Stmt *Parent) {
   assert(Node && Parent && "Passed null Node or Parent");
diff --git a/lib/AST/DeclReferenceMap.cpp b/lib/Index/DeclReferenceMap.cpp
similarity index 95%
rename from lib/AST/DeclReferenceMap.cpp
rename to lib/Index/DeclReferenceMap.cpp
index 41f53fd..841d7fb 100644
--- a/lib/AST/DeclReferenceMap.cpp
+++ b/lib/Index/DeclReferenceMap.cpp
@@ -1,4 +1,4 @@
-//===--- DeclReferenceMap.h - Map Decls to their references -----*- C++ -*-===//
+//===--- DeclReferenceMap.cpp - Map Decls to their references ---*- C++ -*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -12,14 +12,15 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "clang/AST/DeclReferenceMap.h"
+#include "clang/Index/DeclReferenceMap.h"
+#include "clang/Index/ASTLocation.h"
 #include "clang/AST/Decl.h"
 #include "clang/AST/Stmt.h"
-#include "clang/AST/ASTLocation.h"
 #include "clang/AST/DeclVisitor.h"
 #include "clang/AST/StmtVisitor.h"
 #include "llvm/Support/Compiler.h"
 using namespace clang;
+using namespace idx;
 
 namespace {