diff --git a/clang-tools-extra/clangd/IncludeCleaner.cpp b/clang-tools-extra/clangd/IncludeCleaner.cpp --- a/clang-tools-extra/clangd/IncludeCleaner.cpp +++ b/clang-tools-extra/clangd/IncludeCleaner.cpp @@ -197,6 +197,7 @@ } // namespace ReferencedLocations findReferencedLocations(ParsedAST &AST) { + trace::Span Tracer("IncludeCleaner::findReferencedLocations"); ReferencedLocations Result; ReferencedLocationCrawler Crawler(Result); Crawler.TraverseAST(AST.getASTContext()); @@ -225,6 +226,7 @@ std::vector getUnused(const IncludeStructure &Includes, const llvm::DenseSet &ReferencedFiles) { + trace::Span Tracer("IncludeCleaner::getUnused"); std::vector Unused; for (const Inclusion &MFI : Includes.MainFileIncludes) { // FIXME: Skip includes that are not self-contained. @@ -253,6 +255,7 @@ translateToHeaderIDs(const llvm::DenseSet &Files, const IncludeStructure &Includes, const SourceManager &SM) { + trace::Span Tracer("IncludeCleaner::translateToHeaderIDs"); llvm::DenseSet TranslatedHeaderIDs; TranslatedHeaderIDs.reserve(Files.size()); for (FileID FID : Files) { @@ -269,6 +272,7 @@ } std::vector computeUnusedIncludes(ParsedAST &AST) { + trace::Span Tracer("IncludeCleaner::computeUnusedIncludes"); const auto &SM = AST.getSourceManager(); auto Refs = findReferencedLocations(AST);