summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-07-29 23:39:18 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-07-29 23:39:18 +0000
commit82150b38d285e180b3462e690490a665f6a08307 (patch)
tree458f2cebe4c1f13f382a46fb8619a2d3b7cad75a /clang
parentca9efa02714e499278ed33214026e7c13ef20236 (diff)
downloadbcm5719-llvm-82150b38d285e180b3462e690490a665f6a08307.tar.gz
bcm5719-llvm-82150b38d285e180b3462e690490a665f6a08307.zip
Add getDeclReferenceMap() to the abstract interface of TranslationUnit class.
llvm-svn: 77530
Diffstat (limited to 'clang')
-rw-r--r--clang/include/clang/Index/TranslationUnit.h2
-rw-r--r--clang/tools/index-test/index-test.cpp4
2 files changed, 5 insertions, 1 deletions
diff --git a/clang/include/clang/Index/TranslationUnit.h b/clang/include/clang/Index/TranslationUnit.h
index 06c42dc4e57..55417d4eb6c 100644
--- a/clang/include/clang/Index/TranslationUnit.h
+++ b/clang/include/clang/Index/TranslationUnit.h
@@ -18,12 +18,14 @@ namespace clang {
class ASTContext;
namespace idx {
+ class DeclReferenceMap;
/// \brief Abstract interface for a translation unit.
class TranslationUnit {
public:
virtual ~TranslationUnit();
virtual ASTContext &getASTContext() = 0;
+ virtual DeclReferenceMap &getDeclReferenceMap() = 0;
};
} // namespace idx
diff --git a/clang/tools/index-test/index-test.cpp b/clang/tools/index-test/index-test.cpp
index 78ffd37b1ef..5fc6269f7a8 100644
--- a/clang/tools/index-test/index-test.cpp
+++ b/clang/tools/index-test/index-test.cpp
@@ -57,12 +57,14 @@ using namespace idx;
class TUnit : public TranslationUnit {
public:
TUnit(ASTUnit *ast, const std::string &filename)
- : AST(ast), Filename(filename) { }
+ : AST(ast), Filename(filename), DeclRefMap(ast->getASTContext()) { }
virtual ASTContext &getASTContext() { return AST->getASTContext(); }
+ virtual DeclReferenceMap &getDeclReferenceMap() { return DeclRefMap; }
llvm::OwningPtr<ASTUnit> AST;
std::string Filename;
+ DeclReferenceMap DeclRefMap;
};
static llvm::cl::list<ParsedSourceLocation>
OpenPOWER on IntegriCloud