From 01b9d327806c1b2bc401bd4d21cc42ac38598ee5 Mon Sep 17 00:00:00 2001 From: Thomas Van Lenten Date: Tue, 22 Feb 2022 12:56:12 -0800 Subject: [PATCH] Remove unused variable & function. RELNOTES: None PiperOrigin-RevId: 430276243 --- swift/internal/swift_clang_module_aspect.bzl | 36 -------------------- 1 file changed, 36 deletions(-) diff --git a/swift/internal/swift_clang_module_aspect.bzl b/swift/internal/swift_clang_module_aspect.bzl index cfcc5f29d..a43323c41 100644 --- a/swift/internal/swift_clang_module_aspect.bzl +++ b/swift/internal/swift_clang_module_aspect.bzl @@ -39,7 +39,6 @@ load( load( ":utils.bzl", "compilation_context_for_explicit_module_compilation", - "merge_compilation_contexts", ) _MULTIPLE_TARGET_ASPECT_ATTRS = [ @@ -476,7 +475,6 @@ def _module_info_for_target( ): return None, None - attr = aspect_ctx.rule.attr module_map_file = None if not module_name: @@ -798,40 +796,6 @@ def _find_swift_interop_info(target, aspect_ctx): return interop_target[_SwiftInteropInfo], default_direct_swift_infos, default_swift_infos return None, default_direct_swift_infos, default_swift_infos -def _compilation_context_for_target(target): - """Gets the compilation context to use when compiling this target's module. - - This function also handles the special case of a target that propagates an - `apple_common.Objc` provider in addition to its `CcInfo` provider, where the - former contains strict include paths that must also be added when compiling - the module. - - Args: - target: The target to which the aspect is being applied. - - Returns: - A `CcCompilationContext` that contains the headers of the target being - compiled. - """ - if CcInfo not in target: - return None - - compilation_context = target[CcInfo].compilation_context - - if apple_common.Objc in target: - strict_includes = target[apple_common.Objc].strict_include - if strict_includes: - compilation_context = merge_compilation_contexts( - direct_compilation_contexts = [ - compilation_context, - cc_common.create_compilation_context( - includes = strict_includes, - ), - ], - ) - - return compilation_context - def _swift_clang_module_aspect_impl(target, aspect_ctx): # Do nothing if the target already propagates `SwiftInfo`. if SwiftInfo in target: