[clang][DependencyScanning] Use OverlayFS naming consistently#172352
Open
naveen-seth wants to merge 1 commit intollvm:mainfrom
Open
[clang][DependencyScanning] Use OverlayFS naming consistently#172352naveen-seth wants to merge 1 commit intollvm:mainfrom
naveen-seth wants to merge 1 commit intollvm:mainfrom
Conversation
Member
|
@llvm/pr-subscribers-clang Author: Naveen Seth Hanig (naveen-seth) ChangesImproves the readability of Full diff: https://github.com/llvm/llvm-project/pull/172352.diff 1 Files Affected:
diff --git a/clang/lib/Tooling/DependencyScanningTool.cpp b/clang/lib/Tooling/DependencyScanningTool.cpp
index 74cc6af3551f8..87f756d2f4df4 100644
--- a/clang/lib/Tooling/DependencyScanningTool.cpp
+++ b/clang/lib/Tooling/DependencyScanningTool.cpp
@@ -189,15 +189,18 @@ buildCC1CommandLine(const driver::Command &Cmd) {
return Out;
}
+/// Builds the compilation for the given driver command line and returns the
+/// first -cc1 command line, or std::nullopt on error, with diagnostics
+/// reported to \c Diags.
static std::optional<std::vector<std::string>> getFirstCC1CommandLine(
ArrayRef<std::string> CommandLine, DiagnosticsEngine &Diags,
- llvm::IntrusiveRefCntPtr<llvm::vfs::OverlayFileSystem> ScanFS) {
+ llvm::IntrusiveRefCntPtr<llvm::vfs::OverlayFileSystem> OverlayFS) {
// Compilation holds a non-owning a reference to the Driver, hence we need to
// keep the Driver alive when we use Compilation. Arguments to commands may be
// owned by Alloc when expanded from response files.
llvm::BumpPtrAllocator Alloc;
const auto [Driver, Compilation] =
- buildCompilation(CommandLine, Diags, ScanFS, Alloc);
+ buildCompilation(CommandLine, Diags, OverlayFS, Alloc);
if (!Compilation)
return std::nullopt;
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improves the readability of
getFirstCC1CommandLine()by using consistent naming and adding documentation.(This addresses the feedback in #169964 (comment))