aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang/Index/TranslationUnit.h2
-rw-r--r--tools/index-test/index-test.cpp4
2 files changed, 5 insertions, 1 deletions
diff --git a/include/clang/Index/TranslationUnit.h b/include/clang/Index/TranslationUnit.h
index 06c42dc4e5..55417d4eb6 100644
--- a/include/clang/Index/TranslationUnit.h
+++ b/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/tools/index-test/index-test.cpp b/tools/index-test/index-test.cpp
index 78ffd37b1e..5fc6269f7a 100644
--- a/tools/index-test/index-test.cpp
+++ b/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>