forked from OSchip/llvm-project
make -ftime-trace also print template arguments
Without this, I get e.g. 'PerformPendingInstantiations' -> 'std::fill', now I get 'std::fill<unsigned long *, int>'. Differential Revision: https://reviews.llvm.org/D61822 llvm-svn: 360539
This commit is contained in:
parent
debad6460b
commit
ab8cde446b
|
@ -2695,8 +2695,13 @@ void CodeGenModule::EmitGlobalDefinition(GlobalDecl GD, llvm::GlobalValue *GV) {
|
||||||
if (!shouldEmitFunction(GD))
|
if (!shouldEmitFunction(GD))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
llvm::TimeTraceScope TimeScope(
|
llvm::TimeTraceScope TimeScope("CodeGen Function", [&]() {
|
||||||
"CodeGen Function", [&]() { return FD->getQualifiedNameAsString(); });
|
std::string Name;
|
||||||
|
llvm::raw_string_ostream OS(Name);
|
||||||
|
FD->getNameForDiagnostic(OS, getContext().getPrintingPolicy(),
|
||||||
|
/*Qualified=*/true);
|
||||||
|
return Name;
|
||||||
|
});
|
||||||
|
|
||||||
if (const auto *Method = dyn_cast<CXXMethodDecl>(D)) {
|
if (const auto *Method = dyn_cast<CXXMethodDecl>(D)) {
|
||||||
// Make sure to emit the definition(s) before we emit the thunks.
|
// Make sure to emit the definition(s) before we emit the thunks.
|
||||||
|
|
|
@ -2014,7 +2014,11 @@ Sema::InstantiateClass(SourceLocation PointOfInstantiation,
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
llvm::TimeTraceScope TimeScope("InstantiateClass", [&]() {
|
llvm::TimeTraceScope TimeScope("InstantiateClass", [&]() {
|
||||||
return Instantiation->getQualifiedNameAsString();
|
std::string Name;
|
||||||
|
llvm::raw_string_ostream OS(Name);
|
||||||
|
Instantiation->getNameForDiagnostic(OS, getPrintingPolicy(),
|
||||||
|
/*Qualified=*/true);
|
||||||
|
return Name;
|
||||||
});
|
});
|
||||||
|
|
||||||
Pattern = PatternDef;
|
Pattern = PatternDef;
|
||||||
|
|
|
@ -4156,7 +4156,11 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation,
|
||||||
}
|
}
|
||||||
|
|
||||||
llvm::TimeTraceScope TimeScope("InstantiateFunction", [&]() {
|
llvm::TimeTraceScope TimeScope("InstantiateFunction", [&]() {
|
||||||
return Function->getQualifiedNameAsString();
|
std::string Name;
|
||||||
|
llvm::raw_string_ostream OS(Name);
|
||||||
|
Function->getNameForDiagnostic(OS, getPrintingPolicy(),
|
||||||
|
/*Qualified=*/true);
|
||||||
|
return Name;
|
||||||
});
|
});
|
||||||
|
|
||||||
// If we're performing recursive template instantiation, create our own
|
// If we're performing recursive template instantiation, create our own
|
||||||
|
|
Loading…
Reference in New Issue