mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge remote-tracking branch 'origin/master' into master-next
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// This source file is part of the Swift.org open source project
|
||||
//
|
||||
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
|
||||
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
|
||||
// Licensed under Apache License v2.0 with Runtime Library Exception
|
||||
//
|
||||
// See https://swift.org/LICENSE.txt for license information
|
||||
@@ -667,19 +667,19 @@ bool ASTProducer::shouldRebuild(SwiftASTManager::Implementation &MgrImpl,
|
||||
return false;
|
||||
}
|
||||
|
||||
static void collectModuleDependencies(Module *TopMod,
|
||||
llvm::SmallPtrSetImpl<Module *> &Visited,
|
||||
static void collectModuleDependencies(ModuleDecl *TopMod,
|
||||
llvm::SmallPtrSetImpl<ModuleDecl *> &Visited,
|
||||
SmallVectorImpl<std::string> &Filenames) {
|
||||
|
||||
if (!TopMod)
|
||||
return;
|
||||
|
||||
auto ClangModuleLoader = TopMod->getASTContext().getClangModuleLoader();
|
||||
SmallVector<Module::ImportedModule, 8> Imports;
|
||||
TopMod->getImportedModules(Imports, Module::ImportFilter::All);
|
||||
SmallVector<ModuleDecl::ImportedModule, 8> Imports;
|
||||
TopMod->getImportedModules(Imports, ModuleDecl::ImportFilter::All);
|
||||
|
||||
for (auto Import : Imports) {
|
||||
Module *Mod = Import.second;
|
||||
ModuleDecl *Mod = Import.second;
|
||||
if (Mod->isSystemModule())
|
||||
continue;
|
||||
// FIXME: Setup dependencies on the included headers.
|
||||
@@ -799,7 +799,7 @@ ASTUnitRef ASTProducer::createASTUnit(SwiftASTManager::Implementation &MgrImpl,
|
||||
Consumer.setInputBufferIDs(ASTRef->getCompilerInstance().getInputBufferIDs());
|
||||
CompIns.performSema();
|
||||
|
||||
llvm::SmallPtrSet<Module *, 16> Visited;
|
||||
llvm::SmallPtrSet<ModuleDecl *, 16> Visited;
|
||||
SmallVector<std::string, 8> Filenames;
|
||||
collectModuleDependencies(CompIns.getMainModule(), Visited, Filenames);
|
||||
// FIXME: There exists a small window where the module file may have been
|
||||
|
||||
Reference in New Issue
Block a user