This is an archive of the discontinued LLVM Phabricator instance.

[clang][DependencyScanner] Cache modulemap stat failures
ClosedPublic

Authored by Bigcheese on Mar 7 2023, 2:48 PM.

Details

Summary

Add module.modulemap as a file we cache stat failures for as there
are a lot of stats for this file.

Clang currently uses the files it should minimize as a proxy for files
it should cache stat failures for, but really we should cache stat
failures for all paths we don't expect to change during the build.
Unfortunately the VFS API does not know _why_ clang is trying to stat
a path, so we use the filename as a proxy.

Diff Detail

Event Timeline

Bigcheese created this revision.Mar 7 2023, 2:48 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 7 2023, 2:48 PM
Bigcheese requested review of this revision.Mar 7 2023, 2:48 PM
Bigcheese updated this revision to Diff 503160.Mar 7 2023, 2:56 PM

Forgot that Filename is actually a path, so call llvm::sys::path::filename.

Bigcheese updated this revision to Diff 503164.Mar 7 2023, 3:07 PM

Also handle module.map.

benlangmuir accepted this revision.Mar 7 2023, 3:08 PM
This revision is now accepted and ready to land.Mar 7 2023, 3:08 PM
This revision was landed with ongoing or failed builds.Mar 7 2023, 3:14 PM
This revision was automatically updated to reflect the committed changes.