[cfe-commits] r77530 - in /cfe/trunk: include/clang/Index/TranslationUnit.h tools/index-test/index-test.cpp

Argiris Kirtzidis akyrtzi at gmail.com
Wed Jul 29 16:39:18 PDT 2009


Author: akirtzidis
Date: Wed Jul 29 18:39:18 2009
New Revision: 77530

URL: http://llvm.org/viewvc/llvm-project?rev=77530&view=rev
Log:
Add getDeclReferenceMap() to the abstract interface of TranslationUnit class.

Modified:
    cfe/trunk/include/clang/Index/TranslationUnit.h
    cfe/trunk/tools/index-test/index-test.cpp

Modified: cfe/trunk/include/clang/Index/TranslationUnit.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Index/TranslationUnit.h?rev=77530&r1=77529&r2=77530&view=diff

==============================================================================
--- cfe/trunk/include/clang/Index/TranslationUnit.h (original)
+++ cfe/trunk/include/clang/Index/TranslationUnit.h Wed Jul 29 18:39:18 2009
@@ -18,12 +18,14 @@
   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

Modified: cfe/trunk/tools/index-test/index-test.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/index-test/index-test.cpp?rev=77530&r1=77529&r2=77530&view=diff

==============================================================================
--- cfe/trunk/tools/index-test/index-test.cpp (original)
+++ cfe/trunk/tools/index-test/index-test.cpp Wed Jul 29 18:39:18 2009
@@ -57,12 +57,14 @@
 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>





More information about the cfe-commits mailing list