Author: Chuanqi Xu Date: 2023-09-04T13:22:17+08:00 New Revision: f585b7db07f8b3c69141f3975a94c70f6899f733
URL: https://github.com/llvm/llvm-project/commit/f585b7db07f8b3c69141f3975a94c70f6899f733 DIFF: https://github.com/llvm/llvm-project/commit/f585b7db07f8b3c69141f3975a94c70f6899f733.diff LOG: [NFC] Add an overload for getP1689ModuleDependencyFile without output parameters See the comment of https://reviews.llvm.org/D153114. The current signature will make the user to misunderstant that it will write files to the filesystem, while it is not true. This patch adds an overload to erase the concern. And the overload will be used in the support for modules in clangd. Added: Modified: clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h Removed: ################################################################################ diff --git a/clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h b/clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h index f2cd781f57d654..cb9476d1550df3 100644 --- a/clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h +++ b/clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h @@ -106,6 +106,15 @@ class DependencyScanningTool { getP1689ModuleDependencyFile(const clang::tooling::CompileCommand &Command, StringRef CWD, std::string &MakeformatOutput, std::string &MakeformatOutputPath); + llvm::Expected<P1689Rule> + getP1689ModuleDependencyFile(const clang::tooling::CompileCommand &Command, + StringRef CWD) { + std::string MakeformatOutput; + std::string MakeformatOutputPath; + + return getP1689ModuleDependencyFile(Command, CWD, MakeformatOutput, + MakeformatOutputPath); + } /// Given a Clang driver command-line for a translation unit, gather the /// modular dependencies and return the information needed for explicit build. _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits