Split clang_getCursor() into clang_getCursor() and clang_getCursorWithHint().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84873 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/CIndex/CIndex.cpp b/tools/CIndex/CIndex.cpp
index e6e63b8..cbc3085 100644
--- a/tools/CIndex/CIndex.cpp
+++ b/tools/CIndex/CIndex.cpp
@@ -695,13 +695,26 @@
 //
 // CXCursor Operations.
 //
+void clang_initCXLookupHint(CXLookupHint *hint) {
+  memset(hint, 0, sizeof(*hint));
+}
+
 CXCursor clang_getCursor(CXTranslationUnit CTUnit, const char *source_name, 
-                         unsigned line, unsigned column, 
-                         CXDecl RelativeToDecl)
+                         unsigned line, unsigned column) {
+  return clang_getCursorWithHint(CTUnit, source_name, line, column, NULL);
+}
+  
+CXCursor clang_getCursorWithHint(CXTranslationUnit CTUnit,
+                                 const char *source_name, 
+                                 unsigned line, unsigned column, 
+                                 CXLookupHint *hint)
 {
   assert(CTUnit && "Passed null CXTranslationUnit");
   ASTUnit *CXXUnit = static_cast<ASTUnit *>(CTUnit);
   
+  // FIXME: Make this better.
+  CXDecl RelativeToDecl = hint ? hint->decl : NULL;
+  
   FileManager &FMgr = CXXUnit->getFileManager();
   const FileEntry *File = FMgr.getFile(source_name, 
                                        source_name+strlen(source_name));