diff options
Diffstat (limited to 'include/clang/Driver/ArgList.h')
-rw-r--r-- | include/clang/Driver/ArgList.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/clang/Driver/ArgList.h b/include/clang/Driver/ArgList.h index f9698048b2..3affb009fc 100644 --- a/include/clang/Driver/ArgList.h +++ b/include/clang/Driver/ArgList.h @@ -205,9 +205,17 @@ namespace driver { StringRef Default = "") const; /// getLastArgValue - Return the value of the last argument as an integer, + /// or a default. If Diags is non-null, emits an error if the argument + /// is given, but non-integral. + int getLastArgIntValue(OptSpecifier Id, int Default, + DiagnosticsEngine *Diags = 0) const; + + /// getLastArgValue - Return the value of the last argument as an integer, /// or a default. Emits an error if the argument is given, but non-integral. int getLastArgIntValue(OptSpecifier Id, int Default, - DiagnosticsEngine &Diags) const; + DiagnosticsEngine &Diags) const { + return getLastArgIntValue(Id, Default, &Diags); + } /// getAllArgValues - Get the values of all instances of the given argument /// as strings. |