File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed
include/clang/Tooling/DependencyScanning
lib/Tooling/DependencyScanning Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -114,8 +114,12 @@ struct ModuleDeps {
114114 // / Whether this is a "system" module.
115115 bool IsSystem;
116116
117- // / Whether this is a module where it's dependencies resolve within the
118- // / sysroot.
117+ // / Whether this module is fully composed of file & module inputs from the
118+ // / sysroot. External paths, as opposed to virtual file paths, are always used
119+ // / for computing this value.
120+ // /
121+ // / This attribute is useful for identifying modules that are unlikely to
122+ // / change under an active development and build cycle.
119123 bool IsInSysroot;
120124
121125 // / The path to the modulemap file which defines this module.
Original file line number Diff line number Diff line change @@ -748,11 +748,12 @@ ModuleDepCollectorPP::handleTopLevelModule(const Module *M) {
748748 MDC.ScanInstance .getASTReader ()->visitInputFileInfos (
749749 *MF, /* IncludeSystem=*/ true ,
750750 [&](const serialization::InputFileInfo &IFI, bool IsSystem) {
751- auto FullFilePath = ASTReader::ResolveImportedPath (
752- PathBuf, IFI. UnresolvedImportedFilename , MF-> BaseDirectory );
753- if (MD. IsInSysroot )
751+ if (MD. IsInSysroot ) {
752+ auto FullFilePath = ASTReader::ResolveImportedPath (
753+ PathBuf, IFI. UnresolvedImportedFilename , MF-> BaseDirectory );
754754 MD.IsInSysroot = FullFilePath->starts_with (CurrSysroot);
755- PathBuf.resize_for_overwrite (256 );
755+ PathBuf.resize_for_overwrite (256 );
756+ }
756757 if (!(IFI.TopLevel && IFI.ModuleMap ))
757758 return ;
758759 if (IFI.UnresolvedImportedFilenameAsRequested .ends_with (
You can’t perform that action at this time.
0 commit comments