This patch adds support for inferred modules to the dependency scanner.
Effectively a cherry-pick of https://github.com/apple/llvm-project/pull/699 authored by @Bigcheese with libclang and other changes omitted.
Contains following changes:
- [Clang][ScanDeps] Ignore __inferred_module.map dependency.
- This shows up with inferred modules, but it doesn't exist on disk, so don't report it as a dependency.
- [Clang][ScanDeps] Use the module map a module was inferred from for inferred modules.
Also includes a smoke test that uses clang-scan-deps output to perform an explicit build. There's no intention to duplicate whatever test/Modules contains, just to verify the produced command-line does "work" (with very loose definition of work).
Split from D100934.
These three commands rely on file creations in the current working directory.