[PATCH] D39538: [llvm-ar] Support an options string that start with a dash
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 2 09:30:39 PDT 2017
rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.
lgtm
================
Comment at: tools/llvm-ar/llvm-ar.cpp:894
+ strspn(&argv[i][1], OptionChars) + 1 == strlen(argv[i]))
+ argv[i]++;
+ }
----------------
Let's break if argv[i] is "--". That way, users have a way of escaping positional arguments that happen to match this pattern.
https://reviews.llvm.org/D39538
More information about the llvm-commits
mailing list