Path: blob/main/contrib/llvm-project/clang/include/clang-c/CXFile.h
35233 views
/*===-- clang-c/CXFile.h - C Index File ---------------------------*- C -*-===*\1|* *|2|* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|3|* Exceptions. *|4|* See https://llvm.org/LICENSE.txt for license information. *|5|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|6|* *|7|*===----------------------------------------------------------------------===*|8|* *|9|* This header provides the interface to C Index files. *|10|* *|11\*===----------------------------------------------------------------------===*/1213#ifndef LLVM_CLANG_C_CXFILE_H14#define LLVM_CLANG_C_CXFILE_H1516#include <time.h>1718#include "clang-c/CXString.h"19#include "clang-c/ExternC.h"20#include "clang-c/Platform.h"2122LLVM_CLANG_C_EXTERN_C_BEGIN2324/**25* \defgroup CINDEX_FILES File manipulation routines26*27* @{28*/2930/**31* A particular source file that is part of a translation unit.32*/33typedef void *CXFile;3435/**36* Retrieve the complete file and path name of the given file.37*/38CINDEX_LINKAGE CXString clang_getFileName(CXFile SFile);3940/**41* Retrieve the last modification time of the given file.42*/43CINDEX_LINKAGE time_t clang_getFileTime(CXFile SFile);4445/**46* Uniquely identifies a CXFile, that refers to the same underlying file,47* across an indexing session.48*/49typedef struct {50unsigned long long data[3];51} CXFileUniqueID;5253/**54* Retrieve the unique ID for the given \c file.55*56* \param file the file to get the ID for.57* \param outID stores the returned CXFileUniqueID.58* \returns If there was a failure getting the unique ID, returns non-zero,59* otherwise returns 0.60*/61CINDEX_LINKAGE int clang_getFileUniqueID(CXFile file, CXFileUniqueID *outID);6263/**64* Returns non-zero if the \c file1 and \c file2 point to the same file,65* or they are both NULL.66*/67CINDEX_LINKAGE int clang_File_isEqual(CXFile file1, CXFile file2);6869/**70* Returns the real path name of \c file.71*72* An empty string may be returned. Use \c clang_getFileName() in that case.73*/74CINDEX_LINKAGE CXString clang_File_tryGetRealPathName(CXFile file);7576/**77* @}78*/7980LLVM_CLANG_C_EXTERN_C_END8182#endif838485