[clang] [llvm] Add source file name for template instantiations in -ftime-trace (PR #98320)

Utkarsh Saxena via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 18 01:19:17 PDT 2024


================
@@ -3426,11 +3426,16 @@ Sema::InstantiateClass(SourceLocation PointOfInstantiation,
     return true;
 
   llvm::TimeTraceScope TimeScope("InstantiateClass", [&]() {
-    std::string Name;
-    llvm::raw_string_ostream OS(Name);
+    llvm::TimeTraceMetadata M;
+    llvm::raw_string_ostream OS(M.Detail);
     Instantiation->getNameForDiagnostic(OS, getPrintingPolicy(),
                                         /*Qualified=*/true);
-    return Name;
+    if (llvm::isTimeTraceVerbose()) {
----------------
usx95 wrote:

Resolving duplicate comment.

https://github.com/llvm/llvm-project/pull/98320


More information about the cfe-commits mailing list