summaryrefslogtreecommitdiff
path: root/include/clang/Index/Indexer.h
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2010-07-13 17:21:42 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2010-07-13 17:21:42 +0000
commit4ba675006b5a8edfc48b6a9bd3dcf54a70cc08f2 (patch)
tree48b44512b5db8ced345df4a1a56b5065cf2a14d9 /include/clang/Index/Indexer.h
parentd7279c4c177bca357ef96ff1379fd9bc420bfe83 (diff)
Diffstat (limited to 'include/clang/Index/Indexer.h')
-rw-r--r--include/clang/Index/Indexer.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/clang/Index/Indexer.h b/include/clang/Index/Indexer.h
index 361e729feab2..96c585df2478 100644
--- a/include/clang/Index/Indexer.h
+++ b/include/clang/Index/Indexer.h
@@ -23,6 +23,7 @@
namespace clang {
class ASTContext;
+ class FunctionDecl;
namespace idx {
class Program;
@@ -35,6 +36,7 @@ public:
typedef llvm::DenseMap<ASTContext *, TranslationUnit *> CtxTUMapTy;
typedef std::map<Entity, TUSetTy> MapTy;
typedef std::map<GlobalSelector, TUSetTy> SelMapTy;
+ typedef std::map<Entity, std::pair<FunctionDecl*,TranslationUnit*> > DefMapTy;
explicit Indexer(Program &prog) :
Prog(prog) { }
@@ -49,10 +51,15 @@ public:
virtual void GetTranslationUnitsFor(GlobalSelector Sel,
TranslationUnitHandler &Handler);
+ std::pair<FunctionDecl*, TranslationUnit*> getDefinitionFor(Entity Ent);
+
private:
Program &Prog;
MapTy Map;
+ // Map a function Entity to the its definition.
+ DefMapTy DefMap;
+
CtxTUMapTy CtxTUMap;
SelMapTy SelMap;
};