Add support for 'CXFile' (<rdar://problem/7303360>).

- 4 new functions (clang_getCursorSourceFile, clang_getDeclSourceFile, clang_getFileName, clang_getFileTime).

- Should remove clang_getDeclSource() and clang_getCursorSource(). For now, just put 'deprecate' comment in header. 

- Also changed CXX style comment to C style (to eliminate warning).

llvm-svn: 85238
diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h
index cbc1df9..0d41edb 100644
--- a/clang/include/clang-c/Index.h
+++ b/clang/include/clang-c/Index.h
@@ -16,11 +16,13 @@
 #ifndef CLANG_C_INDEX_H
 #define CLANG_C_INDEX_H
 
+#include <sys/stat.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-// MSVC DLL import/export.
+/* MSVC DLL import/export. */
 #ifdef _MSC_VER
   #ifdef _CINDEX_LIB_
     #define CINDEX_LINKAGE __declspec(dllexport)
@@ -44,6 +46,7 @@
 
 typedef void *CXTranslationUnit;  /* A translation unit instance. */
 
+typedef void *CXFile;    /* A source file */
 typedef void *CXDecl;    /* A specific declaration within a translation unit. */
 typedef void *CXStmt;    /* A specific statement within a function/method */
 
@@ -241,6 +244,12 @@
 CINDEX_LINKAGE void clang_loadDeclaration(CXDecl, CXDeclIterator, CXClientData);
 
 /*
+ * CXFile Operations.
+ */
+const char *clang_getFileName(CXFile SFile);
+time_t clang_getFileTime(CXFile SFile);
+
+/*
  * CXEntity Operations.
  */
 CINDEX_LINKAGE const char *clang_getDeclarationName(CXEntity);
@@ -254,7 +263,8 @@
 CINDEX_LINKAGE const char *clang_getDeclSpelling(CXDecl);
 CINDEX_LINKAGE unsigned clang_getDeclLine(CXDecl);
 CINDEX_LINKAGE unsigned clang_getDeclColumn(CXDecl);
-CINDEX_LINKAGE const char *clang_getDeclSource(CXDecl);
+CINDEX_LINKAGE const char *clang_getDeclSource(CXDecl); /* deprecate */
+CINDEX_LINKAGE CXFile clang_getDeclSourceFile(CXDecl);
 
 /*
  * CXCursor Operations.
@@ -289,8 +299,9 @@
 
 CINDEX_LINKAGE unsigned clang_getCursorLine(CXCursor);
 CINDEX_LINKAGE unsigned clang_getCursorColumn(CXCursor);
-CINDEX_LINKAGE const char *clang_getCursorSource(CXCursor);
 CINDEX_LINKAGE const char *clang_getCursorSpelling(CXCursor);
+CINDEX_LINKAGE const char *clang_getCursorSource(CXCursor); /* deprecate */
+CINDEX_LINKAGE CXFile clang_getCursorSourceFile(CXCursor);
 
 /* for debug/testing */
 CINDEX_LINKAGE const char *clang_getCursorKindSpelling(enum CXCursorKind Kind);