summaryrefslogtreecommitdiffstats
path: root/include/clang/Driver/ArgList.h
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2009-11-19 09:00:00 +0000
committerrdivacky <rdivacky@FreeBSD.org>2009-11-19 09:00:00 +0000
commit6df2408694f81a03eb8b0e3b013272042233c061 (patch)
treec7f5a7b6fd212399d821b83b22c1e6a42e8c4a0d /include/clang/Driver/ArgList.h
parent741c13ecc20fb35b836ad690aeecd402f002d654 (diff)
downloadFreeBSD-src-6df2408694f81a03eb8b0e3b013272042233c061.zip
FreeBSD-src-6df2408694f81a03eb8b0e3b013272042233c061.tar.gz
Update clang to r89337.
Diffstat (limited to 'include/clang/Driver/ArgList.h')
-rw-r--r--include/clang/Driver/ArgList.h50
1 files changed, 28 insertions, 22 deletions
diff --git a/include/clang/Driver/ArgList.h b/include/clang/Driver/ArgList.h
index dcb6038..5263108 100644
--- a/include/clang/Driver/ArgList.h
+++ b/include/clang/Driver/ArgList.h
@@ -10,8 +10,7 @@
#ifndef CLANG_DRIVER_ARGLIST_H_
#define CLANG_DRIVER_ARGLIST_H_
-#include "clang/Driver/Options.h"
-
+#include "clang/Driver/OptSpecifier.h"
#include "clang/Driver/Util.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
@@ -26,6 +25,7 @@ namespace llvm {
namespace clang {
namespace driver {
class Arg;
+ class Option;
/// ArgList - Ordered collection of driver arguments.
///
@@ -77,20 +77,26 @@ namespace driver {
/// hasArg - Does the arg list contain any option matching \arg Id.
///
/// \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;
+ bool hasArgNoClaim(OptSpecifier Id) const {
+ return getLastArgNoClaim(Id) != 0;
+ }
+ bool hasArg(OptSpecifier Id) const {
+ return getLastArg(Id) != 0;
+ }
+ bool hasArg(OptSpecifier Id0, OptSpecifier Id1) const {
+ return getLastArg(Id0, Id1) != 0;
}
- bool hasArg(options::ID Id0, options::ID Id1, bool Claim=true) const {
- return getLastArg(Id0, Id1, Claim) != 0;
+ bool hasArg(OptSpecifier Id0, OptSpecifier Id1, OptSpecifier Id2) const {
+ return getLastArg(Id0, Id1, Id2) != 0;
}
/// getLastArg - Return the last argument matching \arg Id, or null.
///
/// \arg Claim Whether the argument should be claimed, if it exists.
- Arg *getLastArg(options::ID Id, bool Claim=true) const;
- Arg *getLastArg(options::ID Id0, options::ID Id1, bool Claim=true) const;
- Arg *getLastArg(options::ID Id0, options::ID Id1, options::ID Id2,
- bool Claim=true) const;
+ Arg *getLastArgNoClaim(OptSpecifier Id) const;
+ Arg *getLastArg(OptSpecifier Id) const;
+ Arg *getLastArg(OptSpecifier Id0, OptSpecifier Id1) const;
+ Arg *getLastArg(OptSpecifier Id0, OptSpecifier Id1, OptSpecifier Id2) const;
/// getArgString - Return the input argument string at \arg Index.
virtual const char *getArgString(unsigned Index) const = 0;
@@ -102,24 +108,24 @@ namespace driver {
/// negation is present, and \arg Default if neither option is
/// given. If both the option and its negation are present, the
/// last one wins.
- bool hasFlag(options::ID Pos, options::ID Neg, bool Default=true) const;
+ bool hasFlag(OptSpecifier Pos, OptSpecifier Neg, bool Default=true) const;
/// AddLastArg - Render only the last argument match \arg Id0, if
/// present.
- void AddLastArg(ArgStringList &Output, options::ID Id0) const;
+ void AddLastArg(ArgStringList &Output, OptSpecifier Id0) const;
/// AddAllArgs - Render all arguments matching the given ids.
- void AddAllArgs(ArgStringList &Output, options::ID Id0) const;
- void AddAllArgs(ArgStringList &Output, options::ID Id0,
- options::ID Id1) const;
- void AddAllArgs(ArgStringList &Output, options::ID Id0, options::ID Id1,
- options::ID Id2) const;
+ void AddAllArgs(ArgStringList &Output, OptSpecifier Id0) const;
+ void AddAllArgs(ArgStringList &Output, OptSpecifier Id0,
+ OptSpecifier Id1) const;
+ void AddAllArgs(ArgStringList &Output, OptSpecifier Id0, OptSpecifier Id1,
+ OptSpecifier Id2) const;
/// AddAllArgValues - Render the argument values of all arguments
/// matching the given ids.
- void AddAllArgValues(ArgStringList &Output, options::ID Id0) const;
- void AddAllArgValues(ArgStringList &Output, options::ID Id0,
- options::ID Id1) const;
+ void AddAllArgValues(ArgStringList &Output, OptSpecifier Id0) const;
+ void AddAllArgValues(ArgStringList &Output, OptSpecifier Id0,
+ OptSpecifier Id1) const;
/// AddAllArgsTranslated - Render all the arguments matching the
/// given ids, but forced to separate args and using the provided
@@ -127,13 +133,13 @@ namespace driver {
///
/// \param Joined - If true, render the argument as joined with
/// the option specifier.
- void AddAllArgsTranslated(ArgStringList &Output, options::ID Id0,
+ void AddAllArgsTranslated(ArgStringList &Output, OptSpecifier Id0,
const char *Translation,
bool Joined = false) const;
/// ClaimAllArgs - Claim all arguments which match the given
/// option id.
- void ClaimAllArgs(options::ID Id0) const;
+ void ClaimAllArgs(OptSpecifier Id0) const;
/// @}
/// @name Arg Synthesis
OpenPOWER on IntegriCloud