2525/// SWIFTSCAN_VERSION_MINOR should increase when there are API additions.
2626/// SWIFTSCAN_VERSION_MAJOR is intended for "major" source/ABI breaking changes.
2727#define SWIFTSCAN_VERSION_MAJOR 0
28- #define SWIFTSCAN_VERSION_MINOR 3
28+ #define SWIFTSCAN_VERSION_MINOR 4
2929
3030SWIFTSCAN_BEGIN_DECLS
3131
@@ -139,6 +139,10 @@ SWIFTSCAN_PUBLIC swiftscan_string_set_t *
139139swiftscan_swift_textual_detail_get_command_line (
140140 swiftscan_module_details_t details );
141141
142+ SWIFTSCAN_PUBLIC swiftscan_string_set_t *
143+ swiftscan_swift_textual_detail_get_bridging_pch_command_line (
144+ swiftscan_module_details_t details );
145+
142146SWIFTSCAN_PUBLIC swiftscan_string_set_t *
143147swiftscan_swift_textual_detail_get_extra_pcm_args (
144148 swiftscan_module_details_t details );
@@ -154,6 +158,14 @@ SWIFTSCAN_PUBLIC swiftscan_string_set_t *
154158swiftscan_swift_textual_detail_get_swift_overlay_dependencies (
155159 swiftscan_module_details_t details );
156160
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+
157169//=== Swift Binary Module Details query APIs ------------------------------===//
158170
159171SWIFTSCAN_PUBLIC swiftscan_string_ref_t
@@ -168,10 +180,18 @@ SWIFTSCAN_PUBLIC swiftscan_string_ref_t
168180swiftscan_swift_binary_detail_get_module_source_info_path (
169181 swiftscan_module_details_t details );
170182
183+ SWIFTSCAN_PUBLIC swiftscan_string_set_t *
184+ swiftscan_swift_binary_detail_get_header_dependencies (
185+ swiftscan_module_details_t details );
186+
171187SWIFTSCAN_PUBLIC bool
172188swiftscan_swift_binary_detail_get_is_framework (
173189 swiftscan_module_details_t details );
174190
191+ SWIFTSCAN_PUBLIC swiftscan_string_ref_t
192+ swiftscan_swift_binary_detail_get_module_cache_key (
193+ swiftscan_module_details_t details );
194+
175195//=== Swift Placeholder Module Details query APIs -------------------------===//
176196
177197SWIFTSCAN_PUBLIC swiftscan_string_ref_t
@@ -200,6 +220,12 @@ swiftscan_clang_detail_get_command_line(swiftscan_module_details_t details);
200220SWIFTSCAN_PUBLIC swiftscan_string_set_t *
201221swiftscan_clang_detail_get_captured_pcm_args (swiftscan_module_details_t details );
202222
223+ SWIFTSCAN_PUBLIC swiftscan_string_ref_t
224+ swiftscan_clang_detail_get_cas_fs_root_id (swiftscan_module_details_t details );
225+
226+ SWIFTSCAN_PUBLIC swiftscan_string_ref_t
227+ swiftscan_clang_detail_get_module_cache_key (swiftscan_module_details_t details );
228+
203229//=== Batch Scan Input Functions ------------------------------------------===//
204230
205231/// Create an \c swiftscan_batch_scan_input_t instance.
@@ -402,6 +428,40 @@ swiftscan_scanner_cache_reset(swiftscan_scanner_t scanner);
402428/// An entry point to invoke the compiler via a library call.
403429SWIFTSCAN_PUBLIC int invoke_swift_compiler (int argc , const char * * argv );
404430
431+ //=== Scanner CAS Operations ----------------------------------------------===//
432+
433+ /// Opaque container for a CAS instance that includes both ObjectStore and
434+ /// ActionCache.
435+ typedef struct swiftscan_cas_s * swiftscan_cas_t ;
436+
437+ /// Enum types for output types for cache key computation.
438+ /// TODO: complete the list.
439+ typedef enum {
440+ SWIFTSCAN_OUTPUT_TYPE_OBJECT = 0 ,
441+ SWIFTSCAN_OUTPUT_TYPE_SWIFTMODULE = 1 ,
442+ SWIFTSCAN_OUTPUT_TYPE_SWIFTINTERFACE = 2 ,
443+ SWIFTSCAN_OUTPUT_TYPE_SWIFTPRIAVEINTERFACE = 3 ,
444+ SWIFTSCAN_OUTPUT_TYPE_CLANG_MODULE = 4 ,
445+ SWIFTSCAN_OUTPUT_TYPE_CLANG_PCH = 5
446+ } swiftscan_output_kind_t ;
447+
448+ /// Create a \c cas instance that points to path.
449+ SWIFTSCAN_PUBLIC swiftscan_cas_t swiftscan_cas_create (const char * path );
450+
451+ /// Dispose the \c cas instance.
452+ SWIFTSCAN_PUBLIC void swiftscan_cas_dispose (swiftscan_cas_t cas );
453+
454+ /// Store content into CAS. Return \c CASID as string.
455+ SWIFTSCAN_PUBLIC swiftscan_string_ref_t swiftscan_cas_store (swiftscan_cas_t cas ,
456+ uint8_t * data ,
457+ unsigned size );
458+
459+ /// Compute \c CacheKey for output of \c kind from the compiler invocation \c
460+ /// argc and \c argv with \c input. Return \c CacheKey as string.
461+ SWIFTSCAN_PUBLIC swiftscan_string_ref_t
462+ swiftscan_compute_cache_key (swiftscan_cas_t cas , int argc , const char * * argv ,
463+ const char * input , swiftscan_output_kind_t kind );
464+
405465//===----------------------------------------------------------------------===//
406466
407467SWIFTSCAN_END_DECLS
0 commit comments