@@ -182,7 +182,10 @@ bool PerformanceDiagnostics::visitFunction(SILFunction *function,
182182 for (SILInstruction &inst : block) {
183183 if (visitInst (&inst, perfConstr, parentLoc)) {
184184 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 " ;
186189 }
187190 LLVM_DEBUG (llvm::dbgs () << inst << *inst.getFunction ());
188191 return true ;
@@ -586,7 +589,10 @@ void PerformanceDiagnostics::checkNonAnnotatedFunction(SILFunction *function) {
586589 auto loc = LocWithParent (inst.getLoc ().getSourceLoc (), nullptr );
587590 if (visitInst (&inst, PerformanceConstraints::None, &loc)) {
588591 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 " ;
590596 }
591597 LLVM_DEBUG (llvm::dbgs () << inst << *inst.getFunction ());
592598 }
0 commit comments