X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=tools%2Fllvm-profdata%2Fllvm-profdata.cpp;h=dc6cd0a5784d615ff7c2bfaa3f13bd1df0b19e41;hp=71768f92382a584c4049296e552ab9f65cbccb5a;hb=cfbaf11a0d56eb76a83ffb4ae334a37a49ea2776;hpb=272ce19ebdbdd5d00bc29659d058f944eaefef8b diff --git a/tools/llvm-profdata/llvm-profdata.cpp b/tools/llvm-profdata/llvm-profdata.cpp index 71768f92382..dc6cd0a5784 100644 --- a/tools/llvm-profdata/llvm-profdata.cpp +++ b/tools/llvm-profdata/llvm-profdata.cpp @@ -267,7 +267,8 @@ static int showInstrProfile(std::string Filename, bool ShowCounts, bool doTextFormatDump = (Show && ShowCounts && TextFormat); if (doTextFormatDump) { - InstrProfWriter::writeRecordInText(Func, OS); + InstrProfSymtab &Symtab = Reader->getSymtab(); + InstrProfWriter::writeRecordInText(Func, Symtab, OS); continue; } @@ -306,6 +307,7 @@ static int showInstrProfile(std::string Filename, bool ShowCounts, } if (ShowIndirectCallTargets) { + InstrProfSymtab &Symtab = Reader->getSymtab(); uint32_t NS = Func.getNumValueSites(IPVK_IndirectCallTarget); OS << " Indirect Target Results: \n"; for (size_t I = 0; I < NS; ++I) { @@ -314,7 +316,8 @@ static int showInstrProfile(std::string Filename, bool ShowCounts, Func.getValueForSite(IPVK_IndirectCallTarget, I); for (uint32_t V = 0; V < NV; V++) { OS << "\t[ " << I << ", "; - OS << (const char *)VD[V].Value << ", " << VD[V].Count << " ]\n"; + OS << Symtab.getFuncName(VD[V].Value) << ", " << VD[V].Count + << " ]\n"; } } }