Switch return site to use clang_getNullCursor().

llvm-svn: 93405
diff --git a/clang/tools/CIndex/CIndex.cpp b/clang/tools/CIndex/CIndex.cpp
index 321f871..86e0ddc 100644
--- a/clang/tools/CIndex/CIndex.cpp
+++ b/clang/tools/CIndex/CIndex.cpp
@@ -971,17 +971,17 @@
   FileManager &FMgr = CXXUnit->getFileManager();
   const FileEntry *File = FMgr.getFile(source_name,
                                        source_name+strlen(source_name));
-  if (!File) {
-    CXCursor C = { CXCursor_InvalidFile, 0, 0, 0 };
-    return C;
-  }
+  if (!File)
+    return clang_getNullCursor();
+
   SourceLocation SLoc =
     CXXUnit->getSourceManager().getLocation(File, line, column);
 
   ASTLocation LastLoc = CXXUnit->getLastASTLocation();
-
   ASTLocation ALoc = ResolveLocationInAST(CXXUnit->getASTContext(), SLoc,
                                           &LastLoc);
+  
+  // FIXME: This doesn't look thread-safe.
   if (ALoc.isValid())
     CXXUnit->setLastASTLocation(ALoc);