summaryrefslogtreecommitdiffstats
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.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/clang/Driver/ArgList.h b/include/clang/Driver/ArgList.h
index 0a8eaea..7a14ae8 100644
--- a/include/clang/Driver/ArgList.h
+++ b/include/clang/Driver/ArgList.h
@@ -17,12 +17,15 @@
#include <list>
#include <string>
+#include <vector>
namespace llvm {
class Twine;
}
namespace clang {
+ class Diagnostic;
+
namespace driver {
class Arg;
class ArgList;
@@ -175,6 +178,25 @@ namespace driver {
/// getArgString - Return the input argument string at \arg Index.
virtual const char *getArgString(unsigned Index) const = 0;
+
+ /// @}
+ /// @name Argument Lookup Utilities
+ /// @{
+
+ /// getLastArgValue - Return the value of the last argument, or a default.
+ llvm::StringRef getLastArgValue(OptSpecifier Id,
+ llvm::StringRef Default = "") 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,
+ Diagnostic &Diags) const;
+
+ /// getAllArgValues - Get the values of all instances of the given argument
+ /// as strings.
+ std::vector<std::string> getAllArgValues(OptSpecifier Id) const;
+
+ /// @}
/// @name Translation Utilities
/// @{
OpenPOWER on IntegriCloud