aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-07-29 23:41:08 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-07-29 23:41:08 +0000
commit0f3984809f998cdfcdef9880fcdade12c9f9b5f6 (patch)
treeb562e08fb5b20b2b7d7f0134153f50f0a46e4106
parent557b1d2535cda65f84fe6a802cf1eec3ccf734e0 (diff)
Add TranslationUnit::getSelectorMap().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77542 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Index/TranslationUnit.h2
-rw-r--r--tools/index-test/index-test.cpp7
2 files changed, 8 insertions, 1 deletions
diff --git a/include/clang/Index/TranslationUnit.h b/include/clang/Index/TranslationUnit.h
index 55417d4eb6..bf9e78f728 100644
--- a/include/clang/Index/TranslationUnit.h
+++ b/include/clang/Index/TranslationUnit.h
@@ -19,6 +19,7 @@ namespace clang {
namespace idx {
class DeclReferenceMap;
+ class SelectorMap;
/// \brief Abstract interface for a translation unit.
class TranslationUnit {
@@ -26,6 +27,7 @@ public:
virtual ~TranslationUnit();
virtual ASTContext &getASTContext() = 0;
virtual DeclReferenceMap &getDeclReferenceMap() = 0;
+ virtual SelectorMap &getSelectorMap() = 0;
};
} // namespace idx
diff --git a/tools/index-test/index-test.cpp b/tools/index-test/index-test.cpp
index a0d60f7b49..037221fcef 100644
--- a/tools/index-test/index-test.cpp
+++ b/tools/index-test/index-test.cpp
@@ -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 @@ using namespace idx;
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>