1 module clang.c.BuildSystem;
2 import clang.c.CXErrorCode;
3 extern (C):
4 
5 /**
6  * \defgroup BUILD_SYSTEM Build system utilities
7  * @{
8  */
9 
10 /**
11  * Return the timestamp for use with Clang's
12  * \c -fbuild-session-timestamp= option.
13  */
14 ulong clang_getBuildSessionTimestamp ();
15 
16 /**
17  * Object encapsulating information about overlaying virtual
18  * file/directories over the real file system.
19  */
20 struct CXVirtualFileOverlayImpl;
21 alias CXVirtualFileOverlay = CXVirtualFileOverlayImpl*;
22 
23 /**
24  * Create a \c CXVirtualFileOverlay object.
25  * Must be disposed with \c clang_VirtualFileOverlay_dispose().
26  *
27  * \param options is reserved, always pass 0.
28  */
29 CXVirtualFileOverlay clang_VirtualFileOverlay_create (uint options);
30 
31 /**
32  * Map an absolute virtual file path to an absolute real one.
33  * The virtual path must be canonicalized (not contain "."/"..").
34  * \returns 0 for success, non-zero to indicate an error.
35  */
36 CXErrorCode clang_VirtualFileOverlay_addFileMapping (
37     CXVirtualFileOverlay,
38     const(char)* virtualPath,
39     const(char)* realPath);
40 
41 /**
42  * Set the case sensitivity for the \c CXVirtualFileOverlay object.
43  * The \c CXVirtualFileOverlay object is case-sensitive by default, this
44  * option can be used to override the default.
45  * \returns 0 for success, non-zero to indicate an error.
46  */
47 CXErrorCode clang_VirtualFileOverlay_setCaseSensitivity (
48     CXVirtualFileOverlay,
49     int caseSensitive);
50 
51 /**
52  * Write out the \c CXVirtualFileOverlay object to a char buffer.
53  *
54  * \param options is reserved, always pass 0.
55  * \param out_buffer_ptr pointer to receive the buffer pointer, which should be
56  * disposed using \c clang_free().
57  * \param out_buffer_size pointer to receive the buffer size.
58  * \returns 0 for success, non-zero to indicate an error.
59  */
60 CXErrorCode clang_VirtualFileOverlay_writeToBuffer (
61     CXVirtualFileOverlay,
62     uint options,
63     char** out_buffer_ptr,
64     uint* out_buffer_size);
65 
66 /**
67  * free memory allocated by libclang, such as the buffer returned by
68  * \c CXVirtualFileOverlay() or \c clang_ModuleMapDescriptor_writeToBuffer().
69  *
70  * \param buffer memory pointer to free.
71  */
72 void clang_free (void* buffer);
73 
74 /**
75  * Dispose a \c CXVirtualFileOverlay object.
76  */
77 void clang_VirtualFileOverlay_dispose (CXVirtualFileOverlay);
78 
79 /**
80  * Object encapsulating information about a module.map file.
81  */
82 struct CXModuleMapDescriptorImpl;
83 alias CXModuleMapDescriptor = CXModuleMapDescriptorImpl*;
84 
85 /**
86  * Create a \c CXModuleMapDescriptor object.
87  * Must be disposed with \c clang_ModuleMapDescriptor_dispose().
88  *
89  * \param options is reserved, always pass 0.
90  */
91 CXModuleMapDescriptor clang_ModuleMapDescriptor_create (uint options);
92 
93 /**
94  * Sets the framework module name that the module.map describes.
95  * \returns 0 for success, non-zero to indicate an error.
96  */
97 CXErrorCode clang_ModuleMapDescriptor_setFrameworkModuleName (
98     CXModuleMapDescriptor,
99     const(char)* name);
100 
101 /**
102  * Sets the umbrella header name that the module.map describes.
103  * \returns 0 for success, non-zero to indicate an error.
104  */
105 CXErrorCode clang_ModuleMapDescriptor_setUmbrellaHeader (
106     CXModuleMapDescriptor,
107     const(char)* name);
108 
109 /**
110  * Write out the \c CXModuleMapDescriptor object to a char buffer.
111  *
112  * \param options is reserved, always pass 0.
113  * \param out_buffer_ptr pointer to receive the buffer pointer, which should be
114  * disposed using \c clang_free().
115  * \param out_buffer_size pointer to receive the buffer size.
116  * \returns 0 for success, non-zero to indicate an error.
117  */
118 CXErrorCode clang_ModuleMapDescriptor_writeToBuffer (
119     CXModuleMapDescriptor,
120     uint options,
121     char** out_buffer_ptr,
122     uint* out_buffer_size);
123 
124 /**
125  * Dispose a \c CXModuleMapDescriptor object.
126  */
127 void clang_ModuleMapDescriptor_dispose (CXModuleMapDescriptor);
128 
129 /**
130  * @}
131  */
132 
133 /* CLANG_C_BUILD_SYSTEM_H */