This is an archive of the discontinued LLVM Phabricator instance.

[clang][deps] Stop using `ClangTool` for virtual files
ClosedPublic

Authored by jansvoboda11 on Sep 9 2021, 3:42 AM.

Details

Summary

This patch changes how the dependency scanner creates the fake input file when scanning dependencies of a single module (introduced in D109485). The scanner now has its own InMemoryFilesystem which sits under the minimizing FS (when that's requested). This makes it possible to drop the duplicate work in DependencyScanningActions::runInvocation that sets up the main file ID. Besides that, this patch makes it possible to land D108979, where we drop ClangTool entirely.

Depends on D109485.

Diff Detail

Event Timeline

jansvoboda11 requested review of this revision.Sep 9 2021, 3:42 AM
jansvoboda11 created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptSep 9 2021, 3:42 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

Updating diff to re-trigger CI...

dexonsmith accepted this revision.Sep 9 2021, 8:39 AM

LGTM, with one nit.

clang/include/clang/Tooling/DependencyScanning/DependencyScanningWorker.h
98

Nit: I suggest "InMemoryFS", which sounds a bit more clear to me.

This revision is now accepted and ready to land.Sep 9 2021, 8:39 AM
This revision was automatically updated to reflect the committed changes.