From: Argyrios Kyrtzidis Date: Wed, 29 Jul 2009 23:39:18 +0000 (+0000) Subject: Add getDeclReferenceMap() to the abstract interface of TranslationUnit class. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=768a6c94a52ddf4f2f6d0c6d611db6cf224b1a1c;p=clang Add getDeclReferenceMap() to the abstract interface of TranslationUnit class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77530 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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 AST; std::string Filename; + DeclReferenceMap DeclRefMap; }; static llvm::cl::list