[PATCH] D39538: [llvm-ar] Support an options string that start with a dash

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 2 13:33:55 PDT 2017


mstorsjo added inline comments.


================
Comment at: tools/llvm-ar/llvm-ar.cpp:894
+        strspn(&argv[i][1], OptionChars) + 1 == strlen(argv[i]))
+      argv[i]++;
+  }
----------------
rnk wrote:
> Let's break if argv[i] is "--". That way, users have a way of escaping positional arguments that happen to match this pattern.
Ok, will do. I'll also break once we strip a dash from some argument, since only one argument should have such a dash.


https://reviews.llvm.org/D39538





More information about the llvm-commits mailing list