aboutsummaryrefslogtreecommitdiff
path: root/lib/Index/Entity.cpp
diff options
context:
space:
mode:
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())