diff options
Diffstat (limited to 'lib/Driver/ArgList.cpp')
-rw-r--r-- | lib/Driver/ArgList.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Driver/ArgList.cpp b/lib/Driver/ArgList.cpp index a45e9d67b2..6a056074b7 100644 --- a/lib/Driver/ArgList.cpp +++ b/lib/Driver/ArgList.cpp @@ -29,3 +29,14 @@ void ArgList::append(Arg *A) { Args.push_back(A); } + +bool ArgList::hasArg(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; ++ie) + if ((*it)->getOption().matches(Id)) + return true; + + return false; +} |