19
19
#include "swift-c/DependencyScan/DependencyScan.h"
20
20
#include "swift/DependencyScan/DependencyScanningTool.h"
21
21
22
- typedef struct {
22
+ struct swiftscan_dependency_result_s {
23
23
/// The name of the main module for this dependency graph (root node)
24
24
swiftscan_string_t main_module_name ;
25
25
26
26
/// The complete list of modules discovered
27
27
swiftscan_dependency_set_t * module_set ;
28
- } swiftscan_impl_dependency_result_t ;
28
+ };
29
29
30
- typedef struct {
30
+ struct swiftscan_dependency_info_s {
31
31
/// The module's name
32
32
/// The format is:
33
33
/// `<module-kind>:<module-name>`
@@ -53,7 +53,7 @@ typedef struct {
53
53
54
54
/// Specific details of a particular kind of module.
55
55
swiftscan_module_details_t details ;
56
- } swiftscan_impl_dependency_info_t ;
56
+ };
57
57
58
58
/// Swift modules to be built from a module interface, may have a bridging
59
59
/// header.
@@ -125,31 +125,31 @@ typedef struct {
125
125
swiftscan_string_set_t * command_line ;
126
126
} swiftscan_clang_details_t ;
127
127
128
- typedef struct {
128
+ struct swiftscan_module_details_s {
129
129
swiftscan_dependency_info_kind_t kind ;
130
130
union {
131
131
swiftscan_swift_textual_details_t swift_textual_details ;
132
132
swiftscan_swift_binary_details_t swift_binary_details ;
133
133
swiftscan_swift_placeholder_details_t swift_placeholder_details ;
134
134
swiftscan_clang_details_t clang_details ;
135
135
};
136
- } swiftscan_impl_module_details_t ;
136
+ } ;
137
137
138
- typedef struct {
138
+ struct swiftscan_batch_scan_entry_s {
139
139
swiftscan_string_t module_name ;
140
140
swiftscan_string_t arguments ;
141
141
bool is_swift ;
142
- } swiftscan_impl_batch_scan_entry_t ;
142
+ };
143
143
144
- typedef struct {
144
+ struct swiftscan_prescan_result_s {
145
145
/// The complete list of imports discovered
146
146
swiftscan_string_set_t * import_set ;
147
- } swiftscan_impl_prescan_result_t ;
147
+ };
148
148
149
- typedef struct {
149
+ struct swiftscan_scan_invocation_s {
150
150
swiftscan_string_t working_directory ;
151
151
swiftscan_string_set_t * argv ;
152
- } swiftscan_impl_scan_invocation_t ;
152
+ };
153
153
154
154
inline swift ::dependencies ::DependencyScanningTool *
155
155
unwrap_scanner (swiftscan_scanner_t P ) {
@@ -162,70 +162,4 @@ wrap_scanner(const swift::dependencies::DependencyScanningTool *P) {
162
162
const_cast < swift ::dependencies ::DependencyScanningTool * > (P ));
163
163
}
164
164
165
- inline swiftscan_impl_module_details_t *
166
- unwrap_details (swiftscan_module_details_t P ) {
167
- return reinterpret_cast < swiftscan_impl_module_details_t * > (P );
168
- }
169
-
170
- inline swiftscan_module_details_t
171
- wrap_details (const swiftscan_impl_module_details_t * P ) {
172
- return reinterpret_cast < swiftscan_module_details_t > (
173
- const_cast < swiftscan_impl_module_details_t * > (P ));
174
- }
175
-
176
- inline swiftscan_impl_dependency_info_t *
177
- unwrap_info (swiftscan_dependency_info_t P ) {
178
- return reinterpret_cast < swiftscan_impl_dependency_info_t * > (P );
179
- }
180
-
181
- inline swiftscan_dependency_info_t
182
- wrap_info (const swiftscan_impl_dependency_info_t * P ) {
183
- return reinterpret_cast < swiftscan_dependency_info_t > (
184
- const_cast < swiftscan_impl_dependency_info_t * > (P ));
185
- }
186
-
187
- inline swiftscan_impl_dependency_result_t *
188
- unwrap_result (swiftscan_dependency_result_t P ) {
189
- return reinterpret_cast < swiftscan_impl_dependency_result_t * > (P );
190
- }
191
-
192
- inline swiftscan_dependency_result_t
193
- wrap_result (const swiftscan_impl_dependency_result_t * P ) {
194
- return reinterpret_cast < swiftscan_dependency_result_t > (
195
- const_cast < swiftscan_impl_dependency_result_t * > (P ));
196
- }
197
-
198
- inline swiftscan_impl_prescan_result_t *
199
- unwrap_prescan_result (swiftscan_prescan_result_t P ) {
200
- return reinterpret_cast < swiftscan_impl_prescan_result_t * > (P );
201
- }
202
-
203
- inline swiftscan_prescan_result_t
204
- wrap_prescan_result (const swiftscan_impl_prescan_result_t * P ) {
205
- return reinterpret_cast < swiftscan_prescan_result_t > (
206
- const_cast < swiftscan_impl_prescan_result_t * > (P ));
207
- }
208
-
209
- inline swiftscan_impl_batch_scan_entry_t *
210
- unwrap_batch_entry (swiftscan_batch_scan_entry_t P ) {
211
- return reinterpret_cast < swiftscan_impl_batch_scan_entry_t * > (P );
212
- }
213
-
214
- inline swiftscan_batch_scan_entry_t
215
- wrap_batch_entry (const swiftscan_impl_batch_scan_entry_t * P ) {
216
- return reinterpret_cast < swiftscan_batch_scan_entry_t > (
217
- const_cast < swiftscan_impl_batch_scan_entry_t * > (P ));
218
- }
219
-
220
- inline swiftscan_impl_scan_invocation_t *
221
- unwrap_scan_invocation (swiftscan_scan_invocation_t P ) {
222
- return reinterpret_cast < swiftscan_impl_scan_invocation_t * > (P );
223
- }
224
-
225
- inline swiftscan_batch_scan_entry_t
226
- wrap_scan_invocation (const swiftscan_impl_scan_invocation_t * P ) {
227
- return reinterpret_cast < swiftscan_scan_invocation_t > (
228
- const_cast < swiftscan_impl_scan_invocation_t * > (P ));
229
- }
230
-
231
165
#endif // SWIFT_C_DEPENDENCY_SCAN_IMPL_H
0 commit comments