aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Driver/ArgList.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Driver/ArgList.h')
-rw-r--r--include/clang/Driver/ArgList.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/clang/Driver/ArgList.h b/include/clang/Driver/ArgList.h
index bd2586ecb6..f4ab57e059 100644
--- a/include/clang/Driver/ArgList.h
+++ b/include/clang/Driver/ArgList.h
@@ -63,10 +63,16 @@ namespace driver {
const char *getArgString(unsigned Index) const { return ArgStrings[Index]; }
/// hasArg - Does the arg list contain any option matching \arg Id.
- bool hasArg(options::ID Id) const { return getLastArg(Id) != 0; }
+ ///
+ /// \arg Claim Whether the argument should be claimed, if it exists.
+ bool hasArg(options::ID Id, bool Claim=true) const {
+ return getLastArg(Id, Claim) != 0;
+ }
/// getLastArg - Return the last argument matching \arg Id, or null.
- Arg *getLastArg(options::ID Id) const;
+ ///
+ /// \arg Claim Whether the argument should be claimed, if it exists.
+ Arg *getLastArg(options::ID Id, bool Claim=true) const;
/// @name Arg Synthesis
/// @{