[clangd] Add some trace::Spans. NFC

llvm-svn: 340815
This commit is contained in:
Ilya Biryukov 2018-08-28 10:57:45 +00:00
parent 6b1e125db9
commit c572dae405
2 changed files with 2 additions and 0 deletions

View File

@ -495,6 +495,7 @@ void ClangdServer::consumeDiagnostics(PathRef File, DocVersion Version,
}
tooling::CompileCommand ClangdServer::getCompileCommand(PathRef File) {
trace::Span Span("GetCompileCommand");
llvm::Optional<tooling::CompileCommand> C = CDB.getCompileCommand(File);
if (!C) // FIXME: Suppress diagnostics? Let the user know?
C = CDB.getFallbackCommand(File);

View File

@ -417,6 +417,7 @@ void ASTWorker::update(
// Note *AST can be still be null if buildAST fails.
if (*AST) {
OnUpdated((*AST)->getDiagnostics());
trace::Span Span("Running main AST callback");
Callbacks.onMainAST(FileName, **AST);
DiagsWereReported = true;
}