This is an archive of the discontinued LLVM Phabricator instance.

[clang-scan-deps] ignore top-level module dependencies that aren't actually imported
ClosedPublic

Authored by arphaman on Jul 15 2021, 1:57 PM.

Details

Summary

Whenever -fmodule-name=top_level_module name is parsed, and clang actually tries to import top_level_module, the headers are imported textually and the module isn't actually built. However, the dependency scanner could still record it as a potential dependency if the module was reimported and thus recorded by the preprocessor callbacks. This patch avoids collecting this kind of module as a dependency by verifying that we don't collect top level modules without actual PCM files.

Diff Detail