Index: llvm/lib/IR/LegacyPassManager.cpp =================================================================== --- llvm/lib/IR/LegacyPassManager.cpp +++ llvm/lib/IR/LegacyPassManager.cpp @@ -32,6 +32,7 @@ #include "llvm/Support/TimeProfiler.h" #include "llvm/Support/Timer.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/Demangle/Demangle.h" #include #include using namespace llvm; @@ -1417,7 +1418,7 @@ FunctionSize = F.getInstructionCount(); } - llvm::TimeTraceScope FunctionScope("OptFunction", F.getName()); + llvm::TimeTraceScope FunctionScope("OptFunction", StringRef(demangle(F.getName().str()))); for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) { FunctionPass *FP = getContainedPass(Index);