diff options
| author | Rong Xu <xur@google.com> | 2016-05-06 23:20:58 +0000 |
|---|---|---|
| committer | Rong Xu <xur@google.com> | 2016-05-06 23:20:58 +0000 |
| commit | 35723644c25054b152072d541e2c8861e71a5cd1 (patch) | |
| tree | a0d777a7719c95690ed8c513da0751165b3cfd5f /llvm/lib/ProfileData | |
| parent | 10379099245114a34f305f697e089422b47598fe (diff) | |
| download | bcm5719-llvm-35723644c25054b152072d541e2c8861e71a5cd1.tar.gz bcm5719-llvm-35723644c25054b152072d541e2c8861e71a5cd1.zip | |
[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.
llvm-svn: 268818
Diffstat (limited to 'llvm/lib/ProfileData')
| -rw-r--r-- | llvm/lib/ProfileData/InstrProfReader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/ProfileData/InstrProfReader.cpp b/llvm/lib/ProfileData/InstrProfReader.cpp index 03f20e877e5..0828bb2c3fc 100644 --- a/llvm/lib/ProfileData/InstrProfReader.cpp +++ b/llvm/lib/ProfileData/InstrProfReader.cpp @@ -174,7 +174,7 @@ TextInstrProfReader::readValueProfileData(InstrProfRecord &Record) { std::vector<InstrProfValueData> CurrentValues; for (uint32_t V = 0; V < NumValueData; V++) { CHECK_LINE_END(Line); - std::pair<StringRef, StringRef> VD = Line->split(':'); + std::pair<StringRef, StringRef> VD = Line->rsplit(':'); uint64_t TakenCount, Value; if (VK == IPVK_IndirectCallTarget) { Symtab->addFuncName(VD.first); |

