================ @@ -18046,6 +18048,19 @@ void Sema::MarkFunctionReferenced(SourceLocation Loc, FunctionDecl *Func, std::make_pair(Func, PointOfInstantiation)); // Notify the consumer that a function was implicitly instantiated. Consumer.HandleCXXImplicitFunctionInstantiation(Func); + + llvm::timeTraceProfilerInsert("DeferInstantiation", [&]() { + llvm::TimeTraceMetadata M; + llvm::raw_string_ostream OS(M.Detail); + Func->getNameForDiagnostic(OS, getPrintingPolicy(), + /*Qualified=*/true); + if (llvm::isTimeTraceVerbose()) { + auto Loc = SourceMgr.getExpansionLoc(Func->getLocation()); + M.File = SourceMgr.getFilename(Loc); + M.Line = SourceMgr.getExpansionLineNumber(Loc); ---------------- usx95 wrote:
I do not think we need location information for deferred instantiations. The fully qualified name should be good enough to find the matching actual TemplateInstantiation. https://github.com/llvm/llvm-project/pull/103039 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits