We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be2fc1d commit 49cef79Copy full SHA for 49cef79
llvm/tools/llvm-config/llvm-config.cpp
@@ -509,13 +509,9 @@ int main(int argc, char **argv) {
509
raw_ostream &OS = outs();
510
511
// Check if we want quoting and escaping.
512
- bool QuotePaths = false;
513
- for (int i = 1; i != argc; ++i) {
514
- if (StringRef(argv[i]) == "--quote-paths") {
515
- QuotePaths = true;
516
- break;
517
- }
518
+ bool QuotePaths = std::any_of(&argv[0], &argv[argc], [](const char *Arg) {
+ return StringRef(Arg) == "--quote-paths";
+ });
519
520
auto MaybePrintQuoted = [&](StringRef Str) {
521
if (QuotePaths)
0 commit comments