[clang][deps] Further canonicalize implicit modules options in dep scan
authorBen Langmuir <blangmuir@apple.com>
Wed, 15 Jun 2022 17:56:11 +0000 (10:56 -0700)
committerBen Langmuir <blangmuir@apple.com>
Wed, 15 Jun 2022 20:29:47 +0000 (13:29 -0700)
commit509223da61145c3eb982751cba9ab6ddf0f48e9d
treedd658c4adf3339f3f5371c579114df30db9964e4
parentafd5a4f2dcd6674d2a09a97bc23475ed745ade89
[clang][deps] Further canonicalize implicit modules options in dep scan

Disable or canonicalize compiler options that are not relevant in
explicit module builds, similar to what we already did for the modules
cache path. This reduces uninteresting differences between
command-lines, which is particularly useful if there is a tool that can
cache the compilations.

Differential Revision: https://reviews.llvm.org/D127883
clang/lib/Tooling/DependencyScanning/DependencyScanningTool.cpp
clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp
clang/test/ClangScanDeps/Inputs/removed-args/cdb.json.template
clang/test/ClangScanDeps/removed-args.c