mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Dependency Scanning] Remove obsolete placeholder module concept
This was used a long time ago for a design of a scanner which could rely on the client to specify that some modules *will be* present at a given location but are not yet during the scan. We have long ago determined that the scanner must have all modules available to it at the time of scan for soundness. This code has been stale for a couple of years and it is time to simplify things a bit by deleting it.
This commit is contained in:
@@ -93,14 +93,6 @@ void swiftscan_dependency_info_details_dispose(
|
||||
swiftscan_string_dispose(
|
||||
details_impl->swift_binary_details.user_module_version);
|
||||
break;
|
||||
case SWIFTSCAN_DEPENDENCY_INFO_SWIFT_PLACEHOLDER:
|
||||
swiftscan_string_dispose(
|
||||
details_impl->swift_placeholder_details.compiled_module_path);
|
||||
swiftscan_string_dispose(
|
||||
details_impl->swift_placeholder_details.module_doc_path);
|
||||
swiftscan_string_dispose(
|
||||
details_impl->swift_placeholder_details.module_source_info_path);
|
||||
break;
|
||||
case SWIFTSCAN_DEPENDENCY_INFO_CLANG:
|
||||
swiftscan_string_dispose(details_impl->clang_details.module_map_path);
|
||||
swiftscan_string_dispose(details_impl->clang_details.context_hash);
|
||||
@@ -168,7 +160,7 @@ swiftscan_dependency_graph_create(swiftscan_scanner_t scanner,
|
||||
|
||||
// Execute the scan and bridge the result
|
||||
auto ScanResult = ScanningTool->getDependencies(
|
||||
Compilation, {},
|
||||
Compilation,
|
||||
swift::c_string_utils::get_C_string(invocation->working_directory));
|
||||
if (ScanResult.getError())
|
||||
return nullptr;
|
||||
@@ -412,23 +404,23 @@ swiftscan_swift_binary_detail_get_user_module_version(
|
||||
return details->swift_binary_details.user_module_version;
|
||||
}
|
||||
|
||||
//=== Swift Placeholder Module Details query APIs -------------------------===//
|
||||
//=== Swift Placeholder Module Details query APIs - DEPRECATED -----------===//
|
||||
|
||||
swiftscan_string_ref_t
|
||||
swiftscan_swift_placeholder_detail_get_compiled_module_path(
|
||||
swiftscan_module_details_t details) {
|
||||
return details->swift_placeholder_details.module_source_info_path;
|
||||
return swift::c_string_utils::create_null();
|
||||
}
|
||||
|
||||
swiftscan_string_ref_t swiftscan_swift_placeholder_detail_get_module_doc_path(
|
||||
swiftscan_module_details_t details) {
|
||||
return details->swift_placeholder_details.module_source_info_path;
|
||||
return swift::c_string_utils::create_null();
|
||||
}
|
||||
|
||||
swiftscan_string_ref_t
|
||||
swiftscan_swift_placeholder_detail_get_module_source_info_path(
|
||||
swiftscan_module_details_t details) {
|
||||
return details->swift_placeholder_details.module_source_info_path;
|
||||
return swift::c_string_utils::create_null();
|
||||
}
|
||||
|
||||
//=== Clang Module Details query APIs -------------------------------------===//
|
||||
|
||||
Reference in New Issue
Block a user