1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

Fix some ArgList uses after API change in r300135.

llvm-svn: 300139
This commit is contained in:
Richard Smith 2017-04-12 23:43:58 +00:00
parent 322f929d52
commit e6e29e1f51
2 changed files with 5 additions and 5 deletions

View File

@ -121,7 +121,7 @@ int llvm::libDriverMain(llvm::ArrayRef<const char*> ArgsArr) {
for (auto *Arg : Args.filtered(OPT_UNKNOWN))
llvm::errs() << "ignoring unknown argument: " << Arg->getSpelling() << "\n";
if (Args.filtered_begin(OPT_INPUT) == Args.filtered_end()) {
if (!Args.hasArgNoClaim(OPT_INPUT)) {
// No input files. To match lib.exe, silently do nothing.
return 0;
}

View File

@ -97,11 +97,11 @@ TEST(Option, OptionParsing) {
EXPECT_NE(std::string::npos, Help.find("-A"));
// Test aliases.
arg_iterator Cs = AL.filtered_begin(OPT_C);
ASSERT_NE(AL.filtered_end(), Cs);
EXPECT_EQ("desu", StringRef((*Cs)->getValue()));
auto Cs = AL.filtered(OPT_C);
ASSERT_NE(Cs.begin(), Cs.end());
EXPECT_EQ("desu", StringRef((*Cs.begin())->getValue()));
ArgStringList ASL;
(*Cs)->render(AL, ASL);
(*Cs.begin())->render(AL, ASL);
ASSERT_EQ(2u, ASL.size());
EXPECT_EQ("-C", StringRef(ASL[0]));
EXPECT_EQ("desu", StringRef(ASL[1]));