Keep only canonical Decls in Entities.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76532 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Index/Entity.cpp b/lib/Index/Entity.cpp
index feed3e4..cc45e25 100644
--- a/lib/Index/Entity.cpp
+++ b/lib/Index/Entity.cpp
@@ -138,6 +138,8 @@
 // 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())