From: Rong Xu Date: Fri, 6 May 2016 23:20:58 +0000 (+0000) Subject: [PGO] Use rsplit to parse value-data line in text profile file. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3a963d121a2e690698987c175ca9760007e87935;p=llvm [PGO] Use rsplit to parse value-data line in text profile file. The value-data line is :. PGOFuncName might contain ':' for the internal linkage functions. We therefore need to use rsplit, rather split, to extract the data from the line. This fixes the error when merging a text profile file to an indexed profile file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268818 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/ProfileData/InstrProfReader.cpp b/lib/ProfileData/InstrProfReader.cpp index 03f20e877e5..0828bb2c3fc 100644 --- a/lib/ProfileData/InstrProfReader.cpp +++ b/lib/ProfileData/InstrProfReader.cpp @@ -174,7 +174,7 @@ TextInstrProfReader::readValueProfileData(InstrProfRecord &Record) { std::vector CurrentValues; for (uint32_t V = 0; V < NumValueData; V++) { CHECK_LINE_END(Line); - std::pair VD = Line->split(':'); + std::pair VD = Line->rsplit(':'); uint64_t TakenCount, Value; if (VK == IPVK_IndirectCallTarget) { Symtab->addFuncName(VD.first);