================
@@ -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:

There’s lots of ways to initialize/teardown things so I’m fine with it the way 
it is, but I wanted to know if there was a reason it wasn’t in those other 
places. 

I’d take another look at how this gets used in other tools, and follow whatever 
seems to be common. 

https://github.com/llvm/llvm-project/pull/97644
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to