aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/ArgList.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-03-12 16:03:38 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-03-12 16:03:38 +0000
commit0c562a23a6560b5736077226ab31d6a9a216ccd3 (patch)
tree62ea0bd1c0ed4667a5ca2fe9a66ac3ff0bdfb62f /lib/Driver/ArgList.cpp
parent00171ffc8ee248e71eaef31c998463e99f2e602e (diff)
Driver: Add ArgList::getLastArg.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66794 91177308-0d34-0410-b5e6-96231b3b80d8
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;
}