llvm.org GIT mirror llvm / 3a963d1
[PGO] Use rsplit to parse value-data line in text profile file. The value-data line is <PGOFuncName>:<Count_Value>. 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 Rong Xu 4 years ago
1 changed file(s) with 1 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
173173 std::vector CurrentValues;
174174 for (uint32_t V = 0; V < NumValueData; V++) {
175175 CHECK_LINE_END(Line);
176 std::pair VD = Line->split(':');
176 std::pair VD = Line->rsplit(':');
177177 uint64_t TakenCount, Value;
178178 if (VK == IPVK_IndirectCallTarget) {
179179 Symtab->addFuncName(VD.first);