mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Frontend] Internalize createDependencyTracker
Expand the FrontendOptions to allow the enabling of the dependency tracker for non-system dependencies, and switch the previous clients of `createDependencyTracker` over to using this option. This ensures that the dependency tracker is now set only during `CompilerInstance::setup`.
This commit is contained in:
@@ -30,14 +30,15 @@ class FileCollector;
|
||||
namespace swift {
|
||||
|
||||
DependencyTracker::DependencyTracker(
|
||||
bool TrackSystemDeps, std::shared_ptr<llvm::FileCollector> FileCollector)
|
||||
IntermoduleDepTrackingMode Mode,
|
||||
std::shared_ptr<llvm::FileCollector> FileCollector)
|
||||
// NB: The ClangImporter believes it's responsible for the construction of
|
||||
// this instance, and it static_cast<>s the instance pointer to its own
|
||||
// subclass based on that belief. If you change this to be some other
|
||||
// instance, you will need to change ClangImporter's code to handle the
|
||||
// difference.
|
||||
: clangCollector(ClangImporter::createDependencyCollector(TrackSystemDeps,
|
||||
FileCollector)) {}
|
||||
: clangCollector(
|
||||
ClangImporter::createDependencyCollector(Mode, FileCollector)) {}
|
||||
|
||||
void
|
||||
DependencyTracker::addDependency(StringRef File, bool IsSystem) {
|
||||
|
||||
Reference in New Issue
Block a user