|
|
|||
File indexing completed on 2026-05-10 08:36:17
0001 /*==-- clang-c/BuildSystem.h - Utilities for use by build systems -*- 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 various utilities for use by build systems. *| 0011 |* *| 0012 \*===----------------------------------------------------------------------===*/ 0013 0014 #ifndef LLVM_CLANG_C_BUILDSYSTEM_H 0015 #define LLVM_CLANG_C_BUILDSYSTEM_H 0016 0017 #include "clang-c/CXErrorCode.h" 0018 #include "clang-c/CXString.h" 0019 #include "clang-c/ExternC.h" 0020 #include "clang-c/Platform.h" 0021 0022 LLVM_CLANG_C_EXTERN_C_BEGIN 0023 0024 /** 0025 * \defgroup BUILD_SYSTEM Build system utilities 0026 * @{ 0027 */ 0028 0029 /** 0030 * Return the timestamp for use with Clang's 0031 * \c -fbuild-session-timestamp= option. 0032 */ 0033 CINDEX_LINKAGE unsigned long long clang_getBuildSessionTimestamp(void); 0034 0035 /** 0036 * Object encapsulating information about overlaying virtual 0037 * file/directories over the real file system. 0038 */ 0039 typedef struct CXVirtualFileOverlayImpl *CXVirtualFileOverlay; 0040 0041 /** 0042 * Create a \c CXVirtualFileOverlay object. 0043 * Must be disposed with \c clang_VirtualFileOverlay_dispose(). 0044 * 0045 * \param options is reserved, always pass 0. 0046 */ 0047 CINDEX_LINKAGE CXVirtualFileOverlay 0048 clang_VirtualFileOverlay_create(unsigned options); 0049 0050 /** 0051 * Map an absolute virtual file path to an absolute real one. 0052 * The virtual path must be canonicalized (not contain "."/".."). 0053 * \returns 0 for success, non-zero to indicate an error. 0054 */ 0055 CINDEX_LINKAGE enum CXErrorCode 0056 clang_VirtualFileOverlay_addFileMapping(CXVirtualFileOverlay, 0057 const char *virtualPath, 0058 const char *realPath); 0059 0060 /** 0061 * Set the case sensitivity for the \c CXVirtualFileOverlay object. 0062 * The \c CXVirtualFileOverlay object is case-sensitive by default, this 0063 * option can be used to override the default. 0064 * \returns 0 for success, non-zero to indicate an error. 0065 */ 0066 CINDEX_LINKAGE enum CXErrorCode 0067 clang_VirtualFileOverlay_setCaseSensitivity(CXVirtualFileOverlay, 0068 int caseSensitive); 0069 0070 /** 0071 * Write out the \c CXVirtualFileOverlay object to a char buffer. 0072 * 0073 * \param options is reserved, always pass 0. 0074 * \param out_buffer_ptr pointer to receive the buffer pointer, which should be 0075 * disposed using \c clang_free(). 0076 * \param out_buffer_size pointer to receive the buffer size. 0077 * \returns 0 for success, non-zero to indicate an error. 0078 */ 0079 CINDEX_LINKAGE enum CXErrorCode 0080 clang_VirtualFileOverlay_writeToBuffer(CXVirtualFileOverlay, unsigned options, 0081 char **out_buffer_ptr, 0082 unsigned *out_buffer_size); 0083 0084 /** 0085 * free memory allocated by libclang, such as the buffer returned by 0086 * \c CXVirtualFileOverlay() or \c clang_ModuleMapDescriptor_writeToBuffer(). 0087 * 0088 * \param buffer memory pointer to free. 0089 */ 0090 CINDEX_LINKAGE void clang_free(void *buffer); 0091 0092 /** 0093 * Dispose a \c CXVirtualFileOverlay object. 0094 */ 0095 CINDEX_LINKAGE void clang_VirtualFileOverlay_dispose(CXVirtualFileOverlay); 0096 0097 /** 0098 * Object encapsulating information about a module.modulemap file. 0099 */ 0100 typedef struct CXModuleMapDescriptorImpl *CXModuleMapDescriptor; 0101 0102 /** 0103 * Create a \c CXModuleMapDescriptor object. 0104 * Must be disposed with \c clang_ModuleMapDescriptor_dispose(). 0105 * 0106 * \param options is reserved, always pass 0. 0107 */ 0108 CINDEX_LINKAGE CXModuleMapDescriptor 0109 clang_ModuleMapDescriptor_create(unsigned options); 0110 0111 /** 0112 * Sets the framework module name that the module.modulemap describes. 0113 * \returns 0 for success, non-zero to indicate an error. 0114 */ 0115 CINDEX_LINKAGE enum CXErrorCode 0116 clang_ModuleMapDescriptor_setFrameworkModuleName(CXModuleMapDescriptor, 0117 const char *name); 0118 0119 /** 0120 * Sets the umbrella header name that the module.modulemap describes. 0121 * \returns 0 for success, non-zero to indicate an error. 0122 */ 0123 CINDEX_LINKAGE enum CXErrorCode 0124 clang_ModuleMapDescriptor_setUmbrellaHeader(CXModuleMapDescriptor, 0125 const char *name); 0126 0127 /** 0128 * Write out the \c CXModuleMapDescriptor object to a char buffer. 0129 * 0130 * \param options is reserved, always pass 0. 0131 * \param out_buffer_ptr pointer to receive the buffer pointer, which should be 0132 * disposed using \c clang_free(). 0133 * \param out_buffer_size pointer to receive the buffer size. 0134 * \returns 0 for success, non-zero to indicate an error. 0135 */ 0136 CINDEX_LINKAGE enum CXErrorCode 0137 clang_ModuleMapDescriptor_writeToBuffer(CXModuleMapDescriptor, unsigned options, 0138 char **out_buffer_ptr, 0139 unsigned *out_buffer_size); 0140 0141 /** 0142 * Dispose a \c CXModuleMapDescriptor object. 0143 */ 0144 CINDEX_LINKAGE void clang_ModuleMapDescriptor_dispose(CXModuleMapDescriptor); 0145 0146 /** 0147 * @} 0148 */ 0149 0150 LLVM_CLANG_C_EXTERN_C_END 0151 0152 #endif /* CLANG_C_BUILD_SYSTEM_H */ 0153
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|