diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-07-21 00:07:06 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-07-21 00:07:06 +0000 |
commit | f7cf15ca3c9bee7c0348f549e7a8f0af32b5fa54 (patch) | |
tree | 05e1fd135984a32777ddfbd291bfdc913046d50a /include/clang/Index/IndexProvider.h | |
parent | 07ef804f918d8aade8739a02e78c6209fd3062a9 (diff) |
Change the semantics for Entity.
Entity can now refer to declarations that are not visible outside the translation unit.
It is a wrapper of a pointer union, it's either a Decl* for declarations that don't
"cross" translation units, or an EntityImpl* which is associated with the specific "visible" Decl.
Included is a test case for handling fields across translation units.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76515 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Index/IndexProvider.h')
-rw-r--r-- | include/clang/Index/IndexProvider.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/clang/Index/IndexProvider.h b/include/clang/Index/IndexProvider.h index 51fa75f0fe..ab86474f9a 100644 --- a/include/clang/Index/IndexProvider.h +++ b/include/clang/Index/IndexProvider.h @@ -26,11 +26,11 @@ namespace idx { /// \brief Maps Entities to TranslationUnits. class IndexProvider { +public: typedef llvm::SmallPtrSet<TranslationUnit *, 4> TUSetTy; - typedef std::map<Entity *, TUSetTy> MapTy; + typedef std::map<Entity, TUSetTy> MapTy; class Indexer; -public: explicit IndexProvider(Program &prog) : Prog(prog) { } Program &getProgram() const { return Prog; } @@ -40,9 +40,9 @@ public: typedef TUSetTy::iterator translation_unit_iterator; - translation_unit_iterator translation_units_begin(Entity *Ent) const; - translation_unit_iterator translation_units_end(Entity *Ent) const; - bool translation_units_empty(Entity *Ent) const; + translation_unit_iterator translation_units_begin(Entity Ent) const; + translation_unit_iterator translation_units_end(Entity Ent) const; + bool translation_units_empty(Entity Ent) const; private: Program &Prog; |