[clang] [Clang] Add TimeTraceScopes to DeduceTemplateArguments (PR #218112)
Younan Zhang via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 24 02:20:15 PDT 2026
zyn0217 wrote:
Look at how InstantiateFunctionDefinition handles the path:
```cpp
llvm::TimeTraceScope TimeScope("InstantiateFunction", [&]() {
llvm::TimeTraceMetadata M;
llvm::raw_string_ostream OS(M.Detail);
Function->getNameForDiagnostic(OS, getPrintingPolicy(),
/*Qualified=*/true);
if (llvm::isTimeTraceVerbose()) {
auto Loc = SourceMgr.getExpansionLoc(Function->getLocation());
M.File = SourceMgr.getFilename(Loc);
M.Line = SourceMgr.getExpansionLineNumber(Loc);
}
return M;
});
```
https://github.com/llvm/llvm-project/pull/218112
More information about the cfe-commits
mailing list