summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/ProfileData/InstrProf.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/llvm/lib/ProfileData/InstrProf.cpp b/llvm/lib/ProfileData/InstrProf.cpp
index 1be3df4699c..2446521a5bc 100644
--- a/llvm/lib/ProfileData/InstrProf.cpp
+++ b/llvm/lib/ProfileData/InstrProf.cpp
@@ -158,15 +158,9 @@ void InstrProfSymtab::create(const Module &M) {
int collectPGOFuncNameStrings(const std::vector<std::string> &NameStrs,
bool doCompression, std::string &Result) {
- assert(NameStrs.size() && "No name data to emit");
-
uint8_t Header[16], *P = Header;
std::string UncompressedNameStrings =
- join(NameStrs.begin(), NameStrs.end(), getInstrProfNameSeparator());
-
- assert(StringRef(UncompressedNameStrings)
- .count(getInstrProfNameSeparator()) == (NameStrs.size() - 1) &&
- "PGO name is invalid (contains separator token)");
+ join(NameStrs.begin(), NameStrs.end(), StringRef(" "));
unsigned EncLen = encodeULEB128(UncompressedNameStrings.length(), P);
P += EncLen;
@@ -244,7 +238,7 @@ int readPGOFuncNameStrings(StringRef NameStrings, InstrProfSymtab &Symtab) {
}
// Now parse the name strings.
SmallVector<StringRef, 0> Names;
- NameStrings.split(Names, getInstrProfNameSeparator());
+ NameStrings.split(Names, ' ');
for (StringRef &Name : Names)
Symtab.addFuncName(Name);
OpenPOWER on IntegriCloud