[clang-tools-extra] [clang-doc] add ftime profiling (PR #97644)
Paul Kirth via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 9 18:07:07 PDT 2024
================
@@ -13,12 +13,17 @@
#include "clang/Index/USRGeneration.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/Error.h"
+#include "llvm/Support/TimeProfiler.h"
namespace clang {
namespace doc {
void MapASTVisitor::HandleTranslationUnit(ASTContext &Context) {
+ if (CDCtx.FTimeTrace)
+ llvm::timeTraceProfilerInitialize(CDCtx.Granularity, "clang-doc");
----------------
ilovepi wrote:
Why here and not say in the lambda in clang-doc main, or in the constructor for the visitor?
https://github.com/llvm/llvm-project/pull/97644
More information about the cfe-commits
mailing list