@@ -65,6 +65,7 @@ namespace tooling {
65
65
namespace dependencies {
66
66
struct ModuleDeps ;
67
67
struct TranslationUnitDeps ;
68
+ enum class ModuleOutputKind ;
68
69
using ModuleDepsGraph = std::vector<ModuleDeps>;
69
70
}
70
71
}
@@ -211,8 +212,7 @@ class ClangImporter final : public ClangModuleLoader {
211
212
bool ignoreClangTarget = false );
212
213
213
214
std::vector<std::string>
214
- getClangDepScanningInvocationArguments (ASTContext &ctx,
215
- std::optional<StringRef> sourceFileName = std::nullopt );
215
+ getClangDepScanningInvocationArguments (ASTContext &ctx);
216
216
217
217
static std::unique_ptr<clang::CompilerInvocation>
218
218
createClangInvocation (ClangImporter *importer,
@@ -499,54 +499,32 @@ class ClangImporter final : public ClangModuleLoader {
499
499
void verifyAllModules () override ;
500
500
501
501
using RemapPathCallback = llvm::function_ref<std::string(StringRef)>;
502
- llvm::SmallVector<std::pair<ModuleDependencyID, ModuleDependencyInfo>, 1 >
502
+ using LookupModuleOutputCallback =
503
+ llvm::function_ref<std::string(const clang::tooling::dependencies::ModuleDeps &,
504
+ clang::tooling::dependencies::ModuleOutputKind)>;
505
+
506
+ static llvm::SmallVector<std::pair<ModuleDependencyID, ModuleDependencyInfo>, 1 >
503
507
bridgeClangModuleDependencies (
508
+ const ASTContext &ctx,
504
509
clang::tooling::dependencies::DependencyScanningTool &clangScanningTool,
505
510
clang::tooling::dependencies::ModuleDepsGraph &clangDependencies,
506
511
StringRef moduleOutputPath, StringRef stableModuleOutputPath,
512
+ LookupModuleOutputCallback LookupModuleOutput,
507
513
RemapPathCallback remapPath = nullptr );
508
514
509
515
llvm::SmallVector<std::pair<ModuleDependencyID, ModuleDependencyInfo>, 1 >
510
516
getModuleDependencies (Identifier moduleName, StringRef moduleOutputPath, StringRef sdkModuleOutputPath,
511
517
const llvm::DenseSet<clang::tooling::dependencies::ModuleID> &alreadySeenClangModules,
512
- clang::tooling::dependencies::DependencyScanningTool &clangScanningTool ,
518
+ const std::vector<std::string> &swiftModuleClangCC1CommandLineArgs ,
513
519
InterfaceSubContextDelegate &delegate,
514
520
llvm::PrefixMapper *mapper,
515
521
bool isTestableImport = false ) override ;
516
522
517
- void recordBridgingHeaderOptions (
518
- ModuleDependencyInfo &MDI,
519
- const clang::tooling::dependencies::TranslationUnitDeps &deps);
520
-
521
- void getBridgingHeaderOptions (
523
+ static void getBridgingHeaderOptions (
524
+ const ASTContext &ctx,
522
525
const clang::tooling::dependencies::TranslationUnitDeps &deps,
523
526
std::vector<std::string> &swiftArgs);
524
527
525
- // / Query dependency information for header dependencies
526
- // / of a binary Swift module.
527
- // /
528
- // / \param moduleID the name of the Swift module whose dependency
529
- // / information will be augmented with information about the given
530
- // / textual header inputs.
531
- // /
532
- // / \param headerPath the path to the header to be scanned.
533
- // /
534
- // / \param clangScanningTool The clang dependency scanner.
535
- // /
536
- // / \param cache The module dependencies cache to update, with information
537
- // / about new Clang modules discovered along the way.
538
- // /
539
- // / \returns \c true if an error occurred, \c false otherwise
540
- bool getHeaderDependencies (
541
- ModuleDependencyID moduleID, std::optional<StringRef> headerPath,
542
- std::optional<llvm::MemoryBufferRef> sourceBuffer,
543
- clang::tooling::dependencies::DependencyScanningTool &clangScanningTool,
544
- ModuleDependenciesCache &cache,
545
- ModuleDependencyIDSetVector &headerClangModuleDependencies,
546
- std::vector<std::string> &headerFileInputs,
547
- std::vector<std::string> &bridgingHeaderCommandLine,
548
- std::optional<std::string> &includeTreeID);
549
-
550
528
clang::TargetInfo &getModuleAvailabilityTarget () const override ;
551
529
clang::ASTContext &getClangASTContext () const override ;
552
530
clang::Preprocessor &getClangPreprocessor () const override ;
0 commit comments