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.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Index/Entity.cpp b/lib/Index/Entity.cpp
index 520d189826..ca2e7c8f3e 100644
--- a/lib/Index/Entity.cpp
+++ b/lib/Index/Entity.cpp
@@ -56,6 +56,9 @@ Entity *EntityGetter::get(Entity *Parent, DeclarationName Name) {
return 0;
IdentifierInfo *II = Name.getAsIdentifierInfo();
+ if (!II)
+ return 0;
+
ProgramImpl::IdEntryTy *Id =
&Prog.getIdents().GetOrCreateValue(II->getName(),
II->getName() + II->getLength());