[PATCH] D117570: Handle whitespace in symbol list

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 18 10:02:31 PST 2022


MaskRay accepted this revision.
MaskRay added a comment.
This revision is now accepted and ready to land.

LGTM.



================
Comment at: llvm/test/Transforms/SampleProfile/Inputs/profile-symbol-list.text:10
 _start
-main
+main 
----------------
You may add leading spaces to another line to make the intention clearer.


================
Comment at: llvm/tools/llvm-profdata/llvm-profdata.cpp:665
+  for (StringRef SymbolStr : SymbolVec) {
+    StringRef SanitizedSymbol = SymbolStr.trim();
+    PSL.add(SanitizedSymbol);
----------------
The variable is only called once. Just inline `SymbolStr.trim()` into the caller.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117570/new/

https://reviews.llvm.org/D117570



More information about the llvm-commits mailing list