[all-commits] [llvm/llvm-project] e60fcf: [clang][deps] Remove support for the deprecated dr...
Jan Svoboda via All-commits
all-commits at lists.llvm.org
Wed Feb 1 13:46:40 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e60fcfd6e568d1471e40e6e8a14070ef126cdf4a
https://github.com/llvm/llvm-project/commit/e60fcfd6e568d1471e40e6e8a14070ef126cdf4a
Author: Jan Svoboda <jan_svoboda at apple.com>
Date: 2023-02-01 (Wed, 01 Feb 2023)
Changed paths:
M clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h
M clang/lib/Tooling/DependencyScanning/DependencyScanningTool.cpp
R clang/test/ClangScanDeps/deprecated-driver-api.c
M clang/tools/clang-scan-deps/ClangScanDeps.cpp
Log Message:
-----------
[clang][deps] Remove support for the deprecated driver API
This API is no longer necessary, so let's remove it to simplify the internal APIs.
Reviewed By: benlangmuir, artemcm
Differential Revision: https://reviews.llvm.org/D140175
Commit: ba556660fe52a558c34556866aba4a0bb8bbbd23
https://github.com/llvm/llvm-project/commit/ba556660fe52a558c34556866aba4a0bb8bbbd23
Author: Jan Svoboda <jan_svoboda at apple.com>
Date: 2023-02-01 (Wed, 01 Feb 2023)
Changed paths:
M clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h
M clang/include/clang/Tooling/DependencyScanning/DependencyScanningWorker.h
M clang/lib/Tooling/DependencyScanning/DependencyScanningTool.cpp
M clang/test/ClangScanDeps/modules-full-by-mod-name.cpp
M clang/tools/clang-scan-deps/ClangScanDeps.cpp
Log Message:
-----------
[clang][deps] NFC: Split out the module-based API from the TU-based API
For users of the C++ API, the return type of `getFullDependencies` doesn't make sense when asking for dependencies of a module. In the returned `FullDependenciesResult` instance, only `DiscoveredModules` is useful (the graph of modular dependecies). The `FullDeps` member is trying to describe a translation unit it was never given. Its command line also refers to a file in the in-memory VFS we create in the scanner, leaking the implementation detail.
This patch splits the API and improves layering and naming of the return types.
Depends on D140175.
Reviewed By: artemcm
Differential Revision: https://reviews.llvm.org/D140176
Commit: 8e9f62e5f833cb89b57bf4c9e80e850bcac7e15e
https://github.com/llvm/llvm-project/commit/8e9f62e5f833cb89b57bf4c9e80e850bcac7e15e
Author: Jan Svoboda <jan_svoboda at apple.com>
Date: 2023-02-01 (Wed, 01 Feb 2023)
Changed paths:
M clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp
R clang/test/ClangScanDeps/Inputs/modules_cdb_by_mod_name.json
R clang/test/ClangScanDeps/Inputs/modules_cdb_clangcl_by_mod_name.json
A clang/test/ClangScanDeps/modules-full-by-mod-name.c
R clang/test/ClangScanDeps/modules-full-by-mod-name.cpp
Log Message:
-----------
[clang][deps] Give the fake file a unique name in by-module-name scans
When scanning dependencies of a module, the command line we're given doesn't have an input file, which the driver needs to be happy. We've been creating a fake in-memory input file named after the module. However, this can hide files/directories on the actual filesystem, leading to errors.
This patch works around that issue by generating a unique file name, which won't collide with the actual file system.
We could also change the driver APIs so that we're able to specify an "assumed" input file. This would be more work, though, since the driver assumes the input name comes from the actual command-line.
Depends on D140176.
Reviewed By: artemcm
Differential Revision: https://reviews.llvm.org/D140177
Compare: https://github.com/llvm/llvm-project/compare/3077d61462e0...8e9f62e5f833
More information about the All-commits
mailing list