[cfe-commits] r76532 - in /cfe/trunk: include/clang/Index/Entity.h lib/Index/Entity.cpp

Argiris Kirtzidis akyrtzi at gmail.com
Mon Jul 20 19:10:32 PDT 2009


Author: akirtzidis
Date: Mon Jul 20 21:10:32 2009
New Revision: 76532

URL: http://llvm.org/viewvc/llvm-project?rev=76532&view=rev
Log:
Keep only canonical Decls in Entities.

Modified:
    cfe/trunk/include/clang/Index/Entity.h
    cfe/trunk/lib/Index/Entity.cpp

Modified: cfe/trunk/include/clang/Index/Entity.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Index/Entity.h?rev=76532&r1=76531&r2=76532&view=diff

==============================================================================
--- cfe/trunk/include/clang/Index/Entity.h (original)
+++ cfe/trunk/include/clang/Index/Entity.h Mon Jul 20 21:10:32 2009
@@ -47,7 +47,7 @@
   /// translation unit, otherwise it stores the associated EntityImpl.
   llvm::PointerUnion<Decl *, EntityImpl *> Val;
 
-  explicit Entity(Decl *D) : Val(D) { }
+  explicit Entity(Decl *D);
   explicit Entity(EntityImpl *impl) : Val(impl) { }
   friend class EntityGetter;
   

Modified: cfe/trunk/lib/Index/Entity.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Index/Entity.cpp?rev=76532&r1=76531&r2=76532&view=diff

==============================================================================
--- cfe/trunk/lib/Index/Entity.cpp (original)
+++ cfe/trunk/lib/Index/Entity.cpp Mon Jul 20 21:10:32 2009
@@ -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())





More information about the cfe-commits mailing list