diff options
author | Jan Svoboda <jan_svoboda@apple.com> | 2021-06-14 12:06:08 +0200 |
---|---|---|
committer | Jan Svoboda <jan_svoboda@apple.com> | 2021-06-14 12:23:33 +0200 |
commit | d8bab69ead22a10dc4cdb2e36f6ea6fdfe774e2e (patch) | |
tree | b7f8f018cc83b2f7954bb24dab2df4c76f19e258 /llvm/lib/CodeGen | |
parent | 35fa3e60d1612dcc4f8e233b046423d948ca9a9b (diff) | |
download | llvm-d8bab69ead22a10dc4cdb2e36f6ea6fdfe774e2e.zip llvm-d8bab69ead22a10dc4cdb2e36f6ea6fdfe774e2e.tar.gz llvm-d8bab69ead22a10dc4cdb2e36f6ea6fdfe774e2e.tar.bz2 |
[clang][deps] Move invocation adjustments from `clang-scan-deps` to `DependencyScanning` library
The `clang-scan-deps` tool has some logic that parses and modifies the original Clang command-line. The goal is to setup `DependencyOutputOptions` by injecting `-M -MT <target>` and prevent the creation of output files.
This patch moves the logic into the `DependencyScanning` library, and uses the parsed `CompilerInvocation` instead of the raw command-line. The code simpler and can be used from the C++ API as well.
The `-o /dev/null` arguments are not necessary, since the `DependencyScanning` library only runs a preprocessing action, so there's no way it'll produce an actual object file.
Related: The `-M` argument implies `-w`, which would appear on the command-line of modular dependencies even though it was not on the original TU command line (see D104036).
Some related tests were updated.
Reviewed By: arphaman
Differential Revision: https://reviews.llvm.org/D104030
Diffstat (limited to 'llvm/lib/CodeGen')
0 files changed, 0 insertions, 0 deletions