diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2023-12-25 17:35:41 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2024-04-19 21:23:58 +0000 |
| commit | a2055961001193c277cffdfffba259ca8fad3835 (patch) | |
| tree | aceda26284a7ba56ded691457493d4ef7364f4e8 /contrib/llvm-project/llvm/lib/ProfileData/InstrProfReader.cpp | |
| parent | b168c9a3e534d5d65fd7070687b85e27217e2bcd (diff) | |
Diffstat (limited to 'contrib/llvm-project/llvm/lib/ProfileData/InstrProfReader.cpp')
| -rw-r--r-- | contrib/llvm-project/llvm/lib/ProfileData/InstrProfReader.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/llvm-project/llvm/lib/ProfileData/InstrProfReader.cpp b/contrib/llvm-project/llvm/lib/ProfileData/InstrProfReader.cpp index 068922d421f8..8f62df79d5b7 100644 --- a/contrib/llvm-project/llvm/lib/ProfileData/InstrProfReader.cpp +++ b/contrib/llvm-project/llvm/lib/ProfileData/InstrProfReader.cpp @@ -1008,12 +1008,13 @@ public: /// Extract the original function name from a PGO function name. static StringRef extractName(StringRef Name) { - // We can have multiple :-separated pieces; there can be pieces both - // before and after the mangled name. Find the first part that starts - // with '_Z'; we'll assume that's the mangled name we want. + // We can have multiple pieces separated by kGlobalIdentifierDelimiter ( + // semicolon now and colon in older profiles); there can be pieces both + // before and after the mangled name. Find the first part that starts with + // '_Z'; we'll assume that's the mangled name we want. std::pair<StringRef, StringRef> Parts = {StringRef(), Name}; while (true) { - Parts = Parts.second.split(':'); + Parts = Parts.second.split(kGlobalIdentifierDelimiter); if (Parts.first.starts_with("_Z")) return Parts.first; if (Parts.second.empty()) |
