[cfe-commits] r77542 - in /cfe/trunk: include/clang/Index/TranslationUnit.h tools/index-test/index-test.cpp
Argiris Kirtzidis
akyrtzi at gmail.com
Wed Jul 29 16:41:08 PDT 2009
Author: akirtzidis
Date: Wed Jul 29 18:41:08 2009
New Revision: 77542
URL: http://llvm.org/viewvc/llvm-project?rev=77542&view=rev
Log:
Add TranslationUnit::getSelectorMap().
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=77542&r1=77541&r2=77542&view=diff
==============================================================================
--- cfe/trunk/include/clang/Index/TranslationUnit.h (original)
+++ cfe/trunk/include/clang/Index/TranslationUnit.h Wed Jul 29 18:41:08 2009
@@ -19,6 +19,7 @@
namespace idx {
class DeclReferenceMap;
+ class SelectorMap;
/// \brief Abstract interface for a translation unit.
class TranslationUnit {
@@ -26,6 +27,7 @@
virtual ~TranslationUnit();
virtual ASTContext &getASTContext() = 0;
virtual DeclReferenceMap &getDeclReferenceMap() = 0;
+ virtual SelectorMap &getSelectorMap() = 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=77542&r1=77541&r2=77542&view=diff
==============================================================================
--- cfe/trunk/tools/index-test/index-test.cpp (original)
+++ cfe/trunk/tools/index-test/index-test.cpp Wed Jul 29 18:41:08 2009
@@ -38,6 +38,7 @@
#include "clang/Index/TranslationUnit.h"
#include "clang/Index/ASTLocation.h"
#include "clang/Index/DeclReferenceMap.h"
+#include "clang/Index/SelectorMap.h"
#include "clang/Index/Handlers.h"
#include "clang/Index/Analyzer.h"
#include "clang/Index/Utils.h"
@@ -58,14 +59,18 @@
class TUnit : public TranslationUnit {
public:
TUnit(ASTUnit *ast, const std::string &filename)
- : AST(ast), Filename(filename), DeclRefMap(ast->getASTContext()) { }
+ : AST(ast), Filename(filename),
+ DeclRefMap(ast->getASTContext()),
+ SelMap(ast->getASTContext()) { }
virtual ASTContext &getASTContext() { return AST->getASTContext(); }
virtual DeclReferenceMap &getDeclReferenceMap() { return DeclRefMap; }
+ virtual SelectorMap &getSelectorMap() { return SelMap; }
llvm::OwningPtr<ASTUnit> AST;
std::string Filename;
DeclReferenceMap DeclRefMap;
+ SelectorMap SelMap;
};
static llvm::cl::list<ParsedSourceLocation>
More information about the cfe-commits
mailing list