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 | 05ac8276cfc37ac89bb46551e1aa7617295ab341 (patch) | |
tree | 52b23e8ce8cd01437a93042cbd02baf559e01a80 /clang/lib/Index/ProgramImpl.h | |
parent | ed73cac647942fb08c052d466e054027a7790d63 (diff) | |
download | bcm5719-llvm-05ac8276cfc37ac89bb46551e1aa7617295ab341.tar.gz bcm5719-llvm-05ac8276cfc37ac89bb46551e1aa7617295ab341.zip |
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.
llvm-svn: 76515
Diffstat (limited to 'clang/lib/Index/ProgramImpl.h')
-rw-r--r-- | clang/lib/Index/ProgramImpl.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/clang/lib/Index/ProgramImpl.h b/clang/lib/Index/ProgramImpl.h index 52f153f1dcd..39fc184677d 100644 --- a/clang/lib/Index/ProgramImpl.h +++ b/clang/lib/Index/ProgramImpl.h @@ -14,8 +14,7 @@ #ifndef LLVM_CLANG_INDEX_PROGRAMIMPL_H #define LLVM_CLANG_INDEX_PROGRAMIMPL_H -#include "clang/Index/Entity.h" -#include "llvm/ADT/StringSet.h" +#include "EntityImpl.h" namespace clang { @@ -24,11 +23,10 @@ namespace idx { class ProgramImpl { public: - typedef llvm::FoldingSet<Entity> EntitySetTy; - typedef llvm::StringMapEntry<char> IdEntryTy; - + typedef llvm::FoldingSet<EntityImpl> EntitySetTy; + private: - llvm::FoldingSet<Entity> Entities; + EntitySetTy Entities; llvm::StringSet<> Idents; llvm::BumpPtrAllocator BumpAlloc; @@ -38,7 +36,7 @@ private: public: ProgramImpl() { } - llvm::FoldingSet<Entity> &getEntities() { return Entities; } + EntitySetTy &getEntities() { return Entities; } llvm::StringSet<> &getIdents() { return Idents; } void *Allocate(unsigned Size, unsigned Align = 8) { |