@@ -182,7 +182,10 @@ bool PerformanceDiagnostics::visitFunction(SILFunction *function,
182
182
for (SILInstruction &inst : block) {
183
183
if (visitInst (&inst, perfConstr, parentLoc)) {
184
184
if (inst.getLoc ().getSourceLoc ().isInvalid ()) {
185
- llvm::errs () << " in function " << inst.getFunction ()->getName () << " \n " ;
185
+ auto demangledName = Demangle::demangleSymbolAsString (
186
+ inst.getFunction ()->getName (),
187
+ Demangle::DemangleOptions::SimplifiedUIDemangleOptions ());
188
+ llvm::errs () << " in function " << demangledName << " \n " ;
186
189
}
187
190
LLVM_DEBUG (llvm::dbgs () << inst << *inst.getFunction ());
188
191
return true ;
@@ -586,7 +589,10 @@ void PerformanceDiagnostics::checkNonAnnotatedFunction(SILFunction *function) {
586
589
auto loc = LocWithParent (inst.getLoc ().getSourceLoc (), nullptr );
587
590
if (visitInst (&inst, PerformanceConstraints::None, &loc)) {
588
591
if (inst.getLoc ().getSourceLoc ().isInvalid ()) {
589
- llvm::errs () << " in function " << inst.getFunction ()->getName () << " \n " ;
592
+ auto demangledName = Demangle::demangleSymbolAsString (
593
+ inst.getFunction ()->getName (),
594
+ Demangle::DemangleOptions::SimplifiedUIDemangleOptions ());
595
+ llvm::errs () << " in function " << demangledName << " \n " ;
590
596
}
591
597
LLVM_DEBUG (llvm::dbgs () << inst << *inst.getFunction ());
592
598
}
0 commit comments