================
@@ -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()) {
----------------
ilya-biryukov wrote:
NIT: you might want to extract this into a function to share code.
Something like `RecordLocationInMetadata`.
It's not a big deal, though, with just few uses.
https://github.com/llvm/llvm-project/pull/98320
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits