[PATCH] D117570: Handle whitespace in symbol list
Chris Bieneman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 18 12:35:05 PST 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG91337e909170: Handle whitespace in symbol list (authored by beanz).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117570/new/
https://reviews.llvm.org/D117570
Files:
llvm/test/Transforms/SampleProfile/Inputs/profile-symbol-list.text
llvm/tools/llvm-profdata/llvm-profdata.cpp
Index: llvm/tools/llvm-profdata/llvm-profdata.cpp
===================================================================
--- llvm/tools/llvm-profdata/llvm-profdata.cpp
+++ llvm/tools/llvm-profdata/llvm-profdata.cpp
@@ -661,8 +661,8 @@
StringRef Data = Buffer->getBuffer();
Data.split(SymbolVec, '\n', /*MaxSplit=*/-1, /*KeepEmpty=*/false);
- for (StringRef symbol : SymbolVec)
- PSL.add(symbol);
+ for (StringRef SymbolStr : SymbolVec)
+ PSL.add(SymbolStr.trim());
}
static void handleExtBinaryWriter(sampleprof::SampleProfileWriter &Writer,
Index: llvm/test/Transforms/SampleProfile/Inputs/profile-symbol-list.text
===================================================================
--- llvm/test/Transforms/SampleProfile/Inputs/profile-symbol-list.text
+++ llvm/test/Transforms/SampleProfile/Inputs/profile-symbol-list.text
@@ -7,4 +7,4 @@
_fini
_init
_start
-main
+ main
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117570.400953.patch
Type: text/x-patch
Size: 894 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220118/ba057f09/attachment.bin>
More information about the llvm-commits
mailing list