aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/ArgList.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Driver/ArgList.cpp')
-rw-r--r--lib/Driver/ArgList.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Driver/ArgList.cpp b/lib/Driver/ArgList.cpp
index aaba406f14..e29977fb0e 100644
--- a/lib/Driver/ArgList.cpp
+++ b/lib/Driver/ArgList.cpp
@@ -30,13 +30,13 @@ void ArgList::append(Arg *A) {
Args.push_back(A);
}
-bool ArgList::hasArg(options::ID Id) const {
+Arg *ArgList::getLastArg(options::ID Id) const {
// FIXME: Make search efficient?
// FIXME: This needs to not require loading of the option.
for (const_iterator it = begin(), ie = end(); it != ie; ++it)
if ((*it)->getOption().matches(Id))
- return true;
+ return *it;
- return false;
+ return 0;
}