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 e74923f commit 93e91a6Copy full SHA for 93e91a6
llvm/tools/llvm-config/llvm-config.cpp
@@ -507,13 +507,9 @@ int main(int argc, char **argv) {
507
raw_ostream &OS = outs();
508
509
// Check if we want quoting and escaping.
510
- bool QuotePaths = false;
511
- for (int i = 1; i != argc; ++i) {
512
- if (StringRef(argv[i]) == "--quote-paths") {
513
- QuotePaths = true;
514
- break;
515
- }
516
+ bool QuotePaths = std::any_of(&argv[0], &argv[argc], [](const char *Arg) {
+ return StringRef(Arg) == "--quote-paths";
+ });
517
518
auto MaybePrintQuoted = [&](StringRef Str) {
519
if (QuotePaths)
0 commit comments