Skip to content

Commit e76e572

Browse files
committed
[clangd] Dont include file version in task name
This will drop file version information from span names, reducing overall cardinality and also effect logging when skipping actions in scheduler. Differential Revision: https://reviews.llvm.org/D113390
1 parent 693b020 commit e76e572

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang-tools-extra/clangd/TUScheduler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@ void ASTWorker::updatePreamble(std::unique_ptr<CompilerInvocation> CI,
992992
std::shared_ptr<const PreambleData> Preamble,
993993
std::vector<Diag> CIDiags,
994994
WantDiagnostics WantDiags) {
995-
std::string TaskName = llvm::formatv("Build AST for ({0})", PI.Version);
995+
llvm::StringLiteral TaskName = "Build AST";
996996
// Store preamble and build diagnostics with new preamble if requested.
997997
auto Task = [this, Preamble = std::move(Preamble), CI = std::move(CI),
998998
PI = std::move(PI), CIDiags = std::move(CIDiags),
@@ -1032,7 +1032,7 @@ void ASTWorker::updatePreamble(std::unique_ptr<CompilerInvocation> CI,
10321032
}
10331033
{
10341034
std::lock_guard<std::mutex> Lock(Mutex);
1035-
PreambleRequests.push_back({std::move(Task), std::move(TaskName),
1035+
PreambleRequests.push_back({std::move(Task), std::string(TaskName),
10361036
steady_clock::now(), Context::current().clone(),
10371037
llvm::None, llvm::None,
10381038
TUScheduler::NoInvalidation, nullptr});

0 commit comments

Comments
 (0)