[Dependency Scanning] Make the batch scan entry container an opaque type

This commit is contained in:
Artem Chikin
2020-12-07 11:45:39 -08:00
parent 409de733f7
commit c6705ad090
3 changed files with 70 additions and 26 deletions

View File

@@ -135,6 +135,12 @@ typedef struct {
};
} swiftscan_impl_module_details_t;
typedef struct {
swiftscan_string_t module_name;
swiftscan_string_t arguments;
bool is_swift;
} swiftscan_impl_batch_scan_entry_t;
inline swift::dependencies::DependencyScanningTool *
unwrap_scanner(swiftscan_scanner_t P) {
return reinterpret_cast<swift::dependencies::DependencyScanningTool *>(P);
@@ -179,4 +185,15 @@ wrap_result(const swiftscan_impl_dependency_result_t *P) {
const_cast<swiftscan_impl_dependency_result_t *>(P));
}
inline swiftscan_impl_batch_scan_entry_t *
unwrap_batch_entry(swiftscan_batch_scan_entry_t P) {
return reinterpret_cast<swiftscan_impl_batch_scan_entry_t *>(P);
}
inline swiftscan_batch_scan_entry_t
wrap_batch_entry(const swiftscan_impl_batch_scan_entry_t *P) {
return reinterpret_cast<swiftscan_batch_scan_entry_t>(
const_cast<swiftscan_impl_batch_scan_entry_t *>(P));
}
#endif // SWIFT_C_DEPENDENCY_SCAN_IMPL_H