aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/clang/lib/Tooling/Tooling.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/clang/lib/Tooling/Tooling.cpp')
-rw-r--r--contrib/llvm-project/clang/lib/Tooling/Tooling.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/contrib/llvm-project/clang/lib/Tooling/Tooling.cpp b/contrib/llvm-project/clang/lib/Tooling/Tooling.cpp
index d192c7f42939..d82cd5e886e4 100644
--- a/contrib/llvm-project/clang/lib/Tooling/Tooling.cpp
+++ b/contrib/llvm-project/clang/lib/Tooling/Tooling.cpp
@@ -554,6 +554,8 @@ int ClangTool::run(ToolAction *Action) {
<< CWD.getError().message() << "\n";
}
+ size_t NumOfTotalFiles = AbsolutePaths.size();
+ unsigned ProcessedFileCounter = 0;
for (llvm::StringRef File : AbsolutePaths) {
// Currently implementations of CompilationDatabase::getCompileCommands can
// change the state of the file system (e.g. prepare generated headers), so
@@ -609,7 +611,11 @@ int ClangTool::run(ToolAction *Action) {
// FIXME: We need a callback mechanism for the tool writer to output a
// customized message for each file.
- LLVM_DEBUG({ llvm::dbgs() << "Processing: " << File << ".\n"; });
+ if (NumOfTotalFiles > 1)
+ llvm::errs() << "[" + std::to_string(++ProcessedFileCounter) + "/" +
+ std::to_string(NumOfTotalFiles) +
+ "] Processing file " + File
+ << ".\n";
ToolInvocation Invocation(std::move(CommandLine), Action, Files.get(),
PCHContainerOps);
Invocation.setDiagnosticConsumer(DiagConsumer);