25
25
/// SWIFTSCAN_VERSION_MINOR should increase when there are API additions.
26
26
/// SWIFTSCAN_VERSION_MAJOR is intended for "major" source/ABI breaking changes.
27
27
#define SWIFTSCAN_VERSION_MAJOR 0
28
- #define SWIFTSCAN_VERSION_MINOR 3
28
+ #define SWIFTSCAN_VERSION_MINOR 4
29
29
30
30
SWIFTSCAN_BEGIN_DECLS
31
31
@@ -139,6 +139,10 @@ SWIFTSCAN_PUBLIC swiftscan_string_set_t *
139
139
swiftscan_swift_textual_detail_get_command_line (
140
140
swiftscan_module_details_t details );
141
141
142
+ SWIFTSCAN_PUBLIC swiftscan_string_set_t *
143
+ swiftscan_swift_textual_detail_get_bridging_pch_command_line (
144
+ swiftscan_module_details_t details );
145
+
142
146
SWIFTSCAN_PUBLIC swiftscan_string_set_t *
143
147
swiftscan_swift_textual_detail_get_extra_pcm_args (
144
148
swiftscan_module_details_t details );
@@ -154,6 +158,14 @@ SWIFTSCAN_PUBLIC swiftscan_string_set_t *
154
158
swiftscan_swift_textual_detail_get_swift_overlay_dependencies (
155
159
swiftscan_module_details_t details );
156
160
161
+ SWIFTSCAN_PUBLIC swiftscan_string_ref_t
162
+ swiftscan_swift_textual_detail_get_cas_fs_root_id (
163
+ swiftscan_module_details_t details );
164
+
165
+ SWIFTSCAN_PUBLIC swiftscan_string_ref_t
166
+ swiftscan_swift_textual_detail_get_module_cache_key (
167
+ swiftscan_module_details_t details );
168
+
157
169
//=== Swift Binary Module Details query APIs ------------------------------===//
158
170
159
171
SWIFTSCAN_PUBLIC swiftscan_string_ref_t
@@ -172,6 +184,10 @@ SWIFTSCAN_PUBLIC bool
172
184
swiftscan_swift_binary_detail_get_is_framework (
173
185
swiftscan_module_details_t details );
174
186
187
+ SWIFTSCAN_PUBLIC swiftscan_string_ref_t
188
+ swiftscan_swift_binary_detail_get_module_cache_key (
189
+ swiftscan_module_details_t details );
190
+
175
191
//=== Swift Placeholder Module Details query APIs -------------------------===//
176
192
177
193
SWIFTSCAN_PUBLIC swiftscan_string_ref_t
@@ -200,6 +216,12 @@ swiftscan_clang_detail_get_command_line(swiftscan_module_details_t details);
200
216
SWIFTSCAN_PUBLIC swiftscan_string_set_t *
201
217
swiftscan_clang_detail_get_captured_pcm_args (swiftscan_module_details_t details );
202
218
219
+ SWIFTSCAN_PUBLIC swiftscan_string_ref_t
220
+ swiftscan_clang_detail_get_cas_fs_root_id (swiftscan_module_details_t details );
221
+
222
+ SWIFTSCAN_PUBLIC swiftscan_string_ref_t
223
+ swiftscan_clang_detail_get_module_cache_key (swiftscan_module_details_t details );
224
+
203
225
//=== Batch Scan Input Functions ------------------------------------------===//
204
226
205
227
/// Create an \c swiftscan_batch_scan_input_t instance.
@@ -402,6 +424,40 @@ swiftscan_scanner_cache_reset(swiftscan_scanner_t scanner);
402
424
/// An entry point to invoke the compiler via a library call.
403
425
SWIFTSCAN_PUBLIC int invoke_swift_compiler (int argc , const char * * argv );
404
426
427
+ //=== Scanner CAS Operations ----------------------------------------------===//
428
+
429
+ /// Opaque container for a CAS instance that includes both ObjectStore and
430
+ /// ActionCache.
431
+ typedef struct swiftscan_cas_s * swiftscan_cas_t ;
432
+
433
+ /// Enum types for output types for cache key computation.
434
+ /// TODO: complete the list.
435
+ typedef enum {
436
+ SWIFTSCAN_OUTPUT_TYPE_OBJECT = 0 ,
437
+ SWIFTSCAN_OUTPUT_TYPE_SWIFTMODULE = 1 ,
438
+ SWIFTSCAN_OUTPUT_TYPE_SWIFTINTERFACE = 2 ,
439
+ SWIFTSCAN_OUTPUT_TYPE_SWIFTPRIAVEINTERFACE = 3 ,
440
+ SWIFTSCAN_OUTPUT_TYPE_CLANG_MODULE = 4 ,
441
+ SWIFTSCAN_OUTPUT_TYPE_CLANG_PCH = 5
442
+ } swiftscan_output_kind_t ;
443
+
444
+ /// Create a \c cas instance that points to path.
445
+ SWIFTSCAN_PUBLIC swiftscan_cas_t swiftscan_cas_create (const char * path );
446
+
447
+ /// Dispose the \c cas instance.
448
+ SWIFTSCAN_PUBLIC void swiftscan_cas_dispose (swiftscan_cas_t cas );
449
+
450
+ /// Store content into CAS. Return \c CASID as string.
451
+ SWIFTSCAN_PUBLIC swiftscan_string_ref_t swiftscan_cas_store (swiftscan_cas_t cas ,
452
+ uint8_t * data ,
453
+ unsigned size );
454
+
455
+ /// Compute \c CacheKey for output of \c kind from the compiler invocation \c
456
+ /// argc and \c argv with \c input. Return \c CacheKey as string.
457
+ SWIFTSCAN_PUBLIC swiftscan_string_ref_t
458
+ swiftscan_compute_cache_key (swiftscan_cas_t cas , int argc , const char * * argv ,
459
+ const char * input , swiftscan_output_kind_t kind );
460
+
405
461
//===----------------------------------------------------------------------===//
406
462
407
463
SWIFTSCAN_END_DECLS
0 commit comments