[PATCH] D51338: [llvm-ar] Support * as comment char in MRI scripts

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 4 22:15:13 PDT 2018


mstorsjo added inline comments.


================
Comment at: tools/llvm-ar/llvm-ar.cpp:807
 
   for (line_iterator I(Ref, /*SkipBlanks*/ true, ';'), E; I != E; ++I) {
     StringRef Line = *I;
----------------
pcc wrote:
> Don't pass `/*SkipBlanks*/ true, ';'` here because you're already handling them below.
Ok, will change.


================
Comment at: tools/llvm-ar/llvm-ar.cpp:810
     StringRef CommandStr, Rest;
+    std::tie(Line, Rest) = Line.split(';');
+    std::tie(Line, Rest) = Line.split('*');
----------------
pcc wrote:
> Perhaps more succinctly `Line = Line.split(';').first;`?
Ah, of course - yes.


https://reviews.llvm.org/D51338





More information about the llvm-commits mailing list