Check whether the IdentifierInfo is null, before using it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76136 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Index/Entity.cpp b/lib/Index/Entity.cpp
index 520d189..ca2e7c8 100644
--- a/lib/Index/Entity.cpp
+++ b/lib/Index/Entity.cpp
@@ -56,6 +56,9 @@
     return 0;
 
   IdentifierInfo *II = Name.getAsIdentifierInfo();
+  if (!II)
+      return 0;
+
   ProgramImpl::IdEntryTy *Id =
       &Prog.getIdents().GetOrCreateValue(II->getName(),
                                          II->getName() + II->getLength());