summaryrefslogtreecommitdiffstats
path: root/clang/lib/Index/Entity.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-07-21 02:10:32 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-07-21 02:10:32 +0000
commit3b4e2a7621efcb9115d3a8f11f56d60f0c78407d (patch)
tree08d4d0b66432be69701c82f3451e7d3967a1a4ad /clang/lib/Index/Entity.cpp
parent3557ea840b477608403232b17b6aff48d885df40 (diff)
downloadbcm5719-llvm-3b4e2a7621efcb9115d3a8f11f56d60f0c78407d.tar.gz
bcm5719-llvm-3b4e2a7621efcb9115d3a8f11f56d60f0c78407d.zip
Keep only canonical Decls in Entities.
llvm-svn: 76532
Diffstat (limited to 'clang/lib/Index/Entity.cpp')
-rw-r--r--clang/lib/Index/Entity.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Index/Entity.cpp b/clang/lib/Index/Entity.cpp
index feed3e4c807..cc45e25cc76 100644
--- a/clang/lib/Index/Entity.cpp
+++ b/clang/lib/Index/Entity.cpp
@@ -138,6 +138,8 @@ Entity EntityImpl::get(Decl *D, ProgramImpl &Prog) {
// Entity Implementation
//===----------------------------------------------------------------------===//
+Entity::Entity(Decl *D) : Val(D->getCanonicalDecl()) { }
+
/// \brief Find the Decl that can be referred to by this entity.
Decl *Entity::getDecl(ASTContext &AST) {
if (isInvalid())
OpenPOWER on IntegriCloud