llvm.org GIT mirror llvm / e22326d
Fix some ArgList uses after API change in r300135. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300139 91177308-0d34-0410-b5e6-96231b3b80d8 Richard Smith 2 years ago
2 changed file(s) with 5 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
120120 for (auto *Arg : Args.filtered(OPT_UNKNOWN))
121121 llvm::errs() << "ignoring unknown argument: " << Arg->getSpelling() << "\n";
122122
123 if (Args.filtered_begin(OPT_INPUT) == Args.filtered_end()) {
123 if (!Args.hasArgNoClaim(OPT_INPUT)) {
124124 // No input files. To match lib.exe, silently do nothing.
125125 return 0;
126126 }
9696 EXPECT_NE(std::string::npos, Help.find("-A"));
9797
9898 // Test aliases.
99 arg_iterator Cs = AL.filtered_begin(OPT_C);
100 ASSERT_NE(AL.filtered_end(), Cs);
101 EXPECT_EQ("desu", StringRef((*Cs)->getValue()));
99 auto Cs = AL.filtered(OPT_C);
100 ASSERT_NE(Cs.begin(), Cs.end());
101 EXPECT_EQ("desu", StringRef((*Cs.begin())->getValue()));
102102 ArgStringList ASL;
103 (*Cs)->render(AL, ASL);
103 (*Cs.begin())->render(AL, ASL);
104104 ASSERT_EQ(2u, ASL.size());
105105 EXPECT_EQ("-C", StringRef(ASL[0]));
106106 EXPECT_EQ("desu", StringRef(ASL[1]));