|
|
|||
File indexing completed on 2026-05-10 08:36:17
0001 /*===-- clang-c/CXFile.h - C Index File ---------------------------*- C -*-===*\ 0002 |* *| 0003 |* Part of the LLVM Project, under the Apache License v2.0 with LLVM *| 0004 |* Exceptions. *| 0005 |* See https://llvm.org/LICENSE.txt for license information. *| 0006 |* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *| 0007 |* *| 0008 |*===----------------------------------------------------------------------===*| 0009 |* *| 0010 |* This header provides the interface to C Index files. *| 0011 |* *| 0012 \*===----------------------------------------------------------------------===*/ 0013 0014 #ifndef LLVM_CLANG_C_CXFILE_H 0015 #define LLVM_CLANG_C_CXFILE_H 0016 0017 #include <time.h> 0018 0019 #include "clang-c/CXString.h" 0020 #include "clang-c/ExternC.h" 0021 #include "clang-c/Platform.h" 0022 0023 LLVM_CLANG_C_EXTERN_C_BEGIN 0024 0025 /** 0026 * \defgroup CINDEX_FILES File manipulation routines 0027 * 0028 * @{ 0029 */ 0030 0031 /** 0032 * A particular source file that is part of a translation unit. 0033 */ 0034 typedef void *CXFile; 0035 0036 /** 0037 * Retrieve the complete file and path name of the given file. 0038 */ 0039 CINDEX_LINKAGE CXString clang_getFileName(CXFile SFile); 0040 0041 /** 0042 * Retrieve the last modification time of the given file. 0043 */ 0044 CINDEX_LINKAGE time_t clang_getFileTime(CXFile SFile); 0045 0046 /** 0047 * Uniquely identifies a CXFile, that refers to the same underlying file, 0048 * across an indexing session. 0049 */ 0050 typedef struct { 0051 unsigned long long data[3]; 0052 } CXFileUniqueID; 0053 0054 /** 0055 * Retrieve the unique ID for the given \c file. 0056 * 0057 * \param file the file to get the ID for. 0058 * \param outID stores the returned CXFileUniqueID. 0059 * \returns If there was a failure getting the unique ID, returns non-zero, 0060 * otherwise returns 0. 0061 */ 0062 CINDEX_LINKAGE int clang_getFileUniqueID(CXFile file, CXFileUniqueID *outID); 0063 0064 /** 0065 * Returns non-zero if the \c file1 and \c file2 point to the same file, 0066 * or they are both NULL. 0067 */ 0068 CINDEX_LINKAGE int clang_File_isEqual(CXFile file1, CXFile file2); 0069 0070 /** 0071 * Returns the real path name of \c file. 0072 * 0073 * An empty string may be returned. Use \c clang_getFileName() in that case. 0074 */ 0075 CINDEX_LINKAGE CXString clang_File_tryGetRealPathName(CXFile file); 0076 0077 /** 0078 * @} 0079 */ 0080 0081 LLVM_CLANG_C_EXTERN_C_END 0082 0083 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|