aboutsummaryrefslogtreecommitdiff
path: root/include/clang
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-07-06 21:34:47 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-07-06 21:34:47 +0000
commitccbcb70ee96cb67ed6c8b4142d050f3a6764edd7 (patch)
treed4803b36db97d778f1fedd25c0e1f0e55f8f660d /include/clang
parent874012b1fb80dff2ec227c726a0c63d55e3db63f (diff)
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
Diffstat (limited to 'include/clang')
-rw-r--r--include/clang/Frontend/Utils.h5
-rw-r--r--include/clang/Index/ASTLocation.h (renamed from include/clang/AST/ASTLocation.h)8
-rw-r--r--include/clang/Index/DeclReferenceMap.h (renamed from include/clang/AST/DeclReferenceMap.h)10
3 files changed, 17 insertions, 6 deletions
diff --git a/include/clang/Frontend/Utils.h b/include/clang/Frontend/Utils.h
index 3153e400ef..7845e8f7cf 100644
--- a/include/clang/Frontend/Utils.h
+++ b/include/clang/Frontend/Utils.h
@@ -36,7 +36,10 @@ class Decl;
class Stmt;
class ASTContext;
class SourceLocation;
+
+namespace idx {
class ASTLocation;
+}
/// ProcessWarningOptions - Initialize the diagnostic client and process the
/// warning options specified on the command line.
@@ -103,7 +106,7 @@ void CacheTokens(Preprocessor& PP, llvm::raw_fd_ostream* OS);
/// Pointing at '100' will return a <VarDecl 'foo', IntegerLiteral '100'> pair.
/// Pointing at '++foo' will return a <FunctionDecl 'f', UnaryOperator> pair.
///
-ASTLocation ResolveLocationInAST(ASTContext &Ctx, SourceLocation Loc);
+idx::ASTLocation ResolveLocationInAST(ASTContext &Ctx, SourceLocation Loc);
} // end namespace clang
diff --git a/include/clang/AST/ASTLocation.h b/include/clang/Index/ASTLocation.h
index f6ace25ca7..4404644e56 100644
--- a/include/clang/AST/ASTLocation.h
+++ b/include/clang/Index/ASTLocation.h
@@ -11,8 +11,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_CLANG_AST_ASTLOCATION_H
-#define LLVM_CLANG_AST_ASTLOCATION_H
+#ifndef LLVM_CLANG_INDEX_ASTLOCATION_H
+#define LLVM_CLANG_INDEX_ASTLOCATION_H
#include <cassert>
@@ -24,6 +24,8 @@ namespace clang {
class Decl;
class Stmt;
+namespace idx {
+
/// \brief Represents a Decl or a Stmt and its immediate Decl parent. It's
/// immutable.
class ASTLocation {
@@ -61,6 +63,8 @@ public:
void print(llvm::raw_ostream &OS);
};
+} // namespace idx
+
} // namespace clang
#endif
diff --git a/include/clang/AST/DeclReferenceMap.h b/include/clang/Index/DeclReferenceMap.h
index 9dd5d47fef..130ca387d5 100644
--- a/include/clang/AST/DeclReferenceMap.h
+++ b/include/clang/Index/DeclReferenceMap.h
@@ -12,15 +12,17 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_CLANG_AST_DECLREFERENCEMAP_H
-#define LLVM_CLANG_AST_DECLREFERENCEMAP_H
+#ifndef LLVM_CLANG_INDEX_DECLREFERENCEMAP_H
+#define LLVM_CLANG_INDEX_DECLREFERENCEMAP_H
-#include "clang/AST/ASTLocation.h"
+#include "clang/Index/ASTLocation.h"
#include <map>
namespace clang {
class ASTContext;
class NamedDecl;
+
+namespace idx {
/// \brief Maps NamedDecls with the ASTLocations that reference them.
///
@@ -76,6 +78,8 @@ public:
private:
mutable MapTy Map;
};
+
+} // end idx namespace
} // end clang namespace