================ @@ -1255,8 +1256,12 @@ Parser::DeclGroupPtrTy Parser::ParseDeclarationOrFunctionDefinition( // Add an enclosing time trace scope for a bunch of small scopes with // "EvaluateAsConstExpr". llvm::TimeTraceScope TimeScope("ParseDeclarationOrFunctionDefinition", [&]() { - return Tok.getLocation().printToString( - Actions.getASTContext().getSourceManager()); + llvm::TimeTraceMetadata M; + const SourceManager &SM = Actions.getASTContext().getSourceManager(); + auto Loc = SM.getExpansionLoc(Tok.getLocation()); + M.File = SM.getFilename(Loc); ---------------- ilya-biryukov wrote:
This is guarded by `isTimeTraceVerbose` in other places, but not here. The only reason I can see for that is historical accidents, although perhaps the parsing events are less frequent too. That being said, I don't think we should necessarily change it in this patch, but could we add a FIXME here saying that other places only log locations in verbose mode and an explanation why this one does not? https://github.com/llvm/llvm-project/pull/106277 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits