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