aboutsummaryrefslogtreecommitdiff
path: root/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
commit1f717270d0ef91918413a05d513474db7a9b4c3e (patch)
tree6e2632894db14619a005a3b06f345defc4917932 /lib/Index/Entity.cpp
parent22cd6581188bbbc6bedaca64ab171b1187a1c06a (diff)
Keep only canonical Decls in Entities.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76532 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Index/Entity.cpp')
-rw-r--r--lib/Index/Entity.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Index/Entity.cpp b/lib/Index/Entity.cpp
index feed3e4c80..cc45e25cc7 100644
--- a/lib/Index/Entity.cpp
+++ b/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())