aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Driver
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Driver')
-rw-r--r--include/clang/Driver/Action.h38
-rw-r--r--include/clang/Driver/Arg.h46
-rw-r--r--include/clang/Driver/ArgList.h26
-rw-r--r--include/clang/Driver/Compilation.h10
-rw-r--r--include/clang/Driver/Driver.h16
-rw-r--r--include/clang/Driver/DriverDiagnostic.h2
-rw-r--r--include/clang/Driver/HostInfo.h18
-rw-r--r--include/clang/Driver/Job.h22
-rw-r--r--include/clang/Driver/Option.h88
-rw-r--r--include/clang/Driver/Options.h4
-rw-r--r--include/clang/Driver/Tool.h8
11 files changed, 139 insertions, 139 deletions
diff --git a/include/clang/Driver/Action.h b/include/clang/Driver/Action.h
index ceef189f7b..679704c395 100644
--- a/include/clang/Driver/Action.h
+++ b/include/clang/Driver/Action.h
@@ -26,7 +26,7 @@ namespace clang {
namespace driver {
class Arg;
-/// Action - Represent an abstract compilation step to perform.
+/// Action - Represent an abstract compilation step to perform.
///
/// An action represents an edge in the compilation graph; typically
/// it is a job to transform an input using some tool.
@@ -63,15 +63,15 @@ private:
/// The output type of this action.
types::ID Type;
-
+
ActionList Inputs;
protected:
Action(ActionClass _Kind, types::ID _Type) : Kind(_Kind), Type(_Type) {}
- Action(ActionClass _Kind, Action *Input, types::ID _Type)
+ Action(ActionClass _Kind, Action *Input, types::ID _Type)
: Kind(_Kind), Type(_Type), Inputs(&Input, &Input + 1) {}
- Action(ActionClass _Kind, const ActionList &_Inputs, types::ID _Type)
- : Kind(_Kind), Type(_Type), Inputs(_Inputs) {}
+ Action(ActionClass _Kind, const ActionList &_Inputs, types::ID _Type)
+ : Kind(_Kind), Type(_Type), Inputs(_Inputs) {}
public:
virtual ~Action();
@@ -90,7 +90,7 @@ public:
const_iterator begin() const { return Inputs.begin(); }
const_iterator end() const { return Inputs.end(); }
- static bool classof(const Action *) { return true; }
+ static bool classof(const Action *) { return true; }
};
class InputAction : public Action {
@@ -100,8 +100,8 @@ public:
const Arg &getInputArg() const { return Input; }
- static bool classof(const Action *A) {
- return A->getKind() == InputClass;
+ static bool classof(const Action *A) {
+ return A->getKind() == InputClass;
}
static bool classof(const InputAction *) { return true; }
};
@@ -116,8 +116,8 @@ public:
const char *getArchName() const { return ArchName; }
- static bool classof(const Action *A) {
- return A->getKind() == BindArchClass;
+ static bool classof(const Action *A) {
+ return A->getKind() == BindArchClass;
}
static bool classof(const BindArchAction *) { return true; }
};
@@ -128,9 +128,9 @@ protected:
JobAction(ActionClass Kind, const ActionList &Inputs, types::ID Type);
public:
- static bool classof(const Action *A) {
+ static bool classof(const Action *A) {
return (A->getKind() >= JobClassFirst &&
- A->getKind() <= JobClassLast);
+ A->getKind() <= JobClassLast);
}
static bool classof(const JobAction *) { return true; }
};
@@ -139,7 +139,7 @@ class PreprocessJobAction : public JobAction {
public:
PreprocessJobAction(Action *Input, types::ID OutputType);
- static bool classof(const Action *A) {
+ static bool classof(const Action *A) {
return A->getKind() == PreprocessJobClass;
}
static bool classof(const PreprocessJobAction *) { return true; }
@@ -149,7 +149,7 @@ class PrecompileJobAction : public JobAction {
public:
PrecompileJobAction(Action *Input, types::ID OutputType);
- static bool classof(const Action *A) {
+ static bool classof(const Action *A) {
return A->getKind() == PrecompileJobClass;
}
static bool classof(const PrecompileJobAction *) { return true; }
@@ -159,7 +159,7 @@ class AnalyzeJobAction : public JobAction {
public:
AnalyzeJobAction(Action *Input, types::ID OutputType);
- static bool classof(const Action *A) {
+ static bool classof(const Action *A) {
return A->getKind() == AnalyzeJobClass;
}
static bool classof(const AnalyzeJobAction *) { return true; }
@@ -169,7 +169,7 @@ class CompileJobAction : public JobAction {
public:
CompileJobAction(Action *Input, types::ID OutputType);
- static bool classof(const Action *A) {
+ static bool classof(const Action *A) {
return A->getKind() == CompileJobClass;
}
static bool classof(const CompileJobAction *) { return true; }
@@ -179,7 +179,7 @@ class AssembleJobAction : public JobAction {
public:
AssembleJobAction(Action *Input, types::ID OutputType);
- static bool classof(const Action *A) {
+ static bool classof(const Action *A) {
return A->getKind() == AssembleJobClass;
}
static bool classof(const AssembleJobAction *) { return true; }
@@ -189,7 +189,7 @@ class LinkJobAction : public JobAction {
public:
LinkJobAction(ActionList &Inputs, types::ID Type);
- static bool classof(const Action *A) {
+ static bool classof(const Action *A) {
return A->getKind() == LinkJobClass;
}
static bool classof(const LinkJobAction *) { return true; }
@@ -199,7 +199,7 @@ class LipoJobAction : public JobAction {
public:
LipoJobAction(ActionList &Inputs, types::ID Type);
- static bool classof(const Action *A) {
+ static bool classof(const Action *A) {
return A->getKind() == LipoJobClass;
}
static bool classof(const LipoJobAction *) { return true; }
diff --git a/include/clang/Driver/Arg.h b/include/clang/Driver/Arg.h
index 6bed2b8cbd..ebf40d45de 100644
--- a/include/clang/Driver/Arg.h
+++ b/include/clang/Driver/Arg.h
@@ -49,7 +49,7 @@ namespace driver {
/// The option this argument is an instance of.
const Option *Opt;
-
+
/// The argument this argument was derived from (during tool chain
/// argument translation), if any.
const Arg *BaseArg;
@@ -66,7 +66,7 @@ namespace driver {
protected:
Arg(ArgClass Kind, const Option *Opt, unsigned Index,
const Arg *BaseArg = 0);
-
+
public:
Arg(const Arg &);
virtual ~Arg();
@@ -74,12 +74,12 @@ namespace driver {
ArgClass getKind() const { return Kind; }
const Option &getOption() const { return *Opt; }
unsigned getIndex() const { return Index; }
-
+
/// getBaseArg - Return the base argument which generated this
/// arg; this is either the argument itself or the argument it was
/// derived from during tool chain specific argument translation.
- const Arg &getBaseArg() const {
- return BaseArg ? *BaseArg : *this;
+ const Arg &getBaseArg() const {
+ return BaseArg ? *BaseArg : *this;
}
void setBaseArg(const Arg *_BaseArg) {
BaseArg = _BaseArg;
@@ -88,14 +88,14 @@ namespace driver {
bool isClaimed() const { return getBaseArg().Claimed; }
/// claim - Set the Arg claimed bit.
-
+
// FIXME: We need to deal with derived arguments and set the bit
// in the original argument; not the derived one.
void claim() const { getBaseArg().Claimed = true; }
virtual unsigned getNumValues() const = 0;
virtual const char *getValue(const ArgList &Args, unsigned N=0) const = 0;
-
+
/// render - Append the argument onto the given array as strings.
virtual void render(const ArgList &Args, ArgStringList &Output) const = 0;
@@ -105,7 +105,7 @@ namespace driver {
/// (e.g., Xlinker).
void renderAsInput(const ArgList &Args, ArgStringList &Output) const;
- static bool classof(const Arg *) { return true; }
+ static bool classof(const Arg *) { return true; }
void dump() const;
@@ -124,8 +124,8 @@ namespace driver {
virtual unsigned getNumValues() const { return 0; }
virtual const char *getValue(const ArgList &Args, unsigned N=0) const;
- static bool classof(const Arg *A) {
- return A->getKind() == Arg::FlagClass;
+ static bool classof(const Arg *A) {
+ return A->getKind() == Arg::FlagClass;
}
static bool classof(const FlagArg *) { return true; }
};
@@ -140,8 +140,8 @@ namespace driver {
virtual unsigned getNumValues() const { return 1; }
virtual const char *getValue(const ArgList &Args, unsigned N=0) const;
- static bool classof(const Arg *A) {
- return A->getKind() == Arg::PositionalClass;
+ static bool classof(const Arg *A) {
+ return A->getKind() == Arg::PositionalClass;
}
static bool classof(const PositionalArg *) { return true; }
};
@@ -157,8 +157,8 @@ namespace driver {
virtual unsigned getNumValues() const { return 1; }
virtual const char *getValue(const ArgList &Args, unsigned N=0) const;
- static bool classof(const Arg *A) {
- return A->getKind() == Arg::JoinedClass;
+ static bool classof(const Arg *A) {
+ return A->getKind() == Arg::JoinedClass;
}
static bool classof(const JoinedArg *) { return true; }
};
@@ -169,7 +169,7 @@ namespace driver {
unsigned NumValues;
public:
- SeparateArg(const Option *Opt, unsigned Index, unsigned NumValues,
+ SeparateArg(const Option *Opt, unsigned Index, unsigned NumValues,
const Arg *BaseArg = 0);
virtual void render(const ArgList &Args, ArgStringList &Output) const;
@@ -177,8 +177,8 @@ namespace driver {
virtual unsigned getNumValues() const { return NumValues; }
virtual const char *getValue(const ArgList &Args, unsigned N=0) const;
- static bool classof(const Arg *A) {
- return A->getKind() == Arg::SeparateClass;
+ static bool classof(const Arg *A) {
+ return A->getKind() == Arg::SeparateClass;
}
static bool classof(const SeparateArg *) { return true; }
};
@@ -193,7 +193,7 @@ namespace driver {
std::vector<std::string> Values;
public:
- CommaJoinedArg(const Option *Opt, unsigned Index, const char *Str,
+ CommaJoinedArg(const Option *Opt, unsigned Index, const char *Str,
const Arg *BaseArg = 0);
virtual void render(const ArgList &Args, ArgStringList &Output) const;
@@ -201,8 +201,8 @@ namespace driver {
virtual unsigned getNumValues() const { return Values.size(); }
virtual const char *getValue(const ArgList &Args, unsigned N=0) const;
- static bool classof(const Arg *A) {
- return A->getKind() == Arg::CommaJoinedClass;
+ static bool classof(const Arg *A) {
+ return A->getKind() == Arg::CommaJoinedClass;
}
static bool classof(const CommaJoinedArg *) { return true; }
};
@@ -211,7 +211,7 @@ namespace driver {
/// values.
class JoinedAndSeparateArg : public Arg {
public:
- JoinedAndSeparateArg(const Option *Opt, unsigned Index,
+ JoinedAndSeparateArg(const Option *Opt, unsigned Index,
const Arg *BaseArg = 0);
virtual void render(const ArgList &Args, ArgStringList &Output) const;
@@ -219,8 +219,8 @@ namespace driver {
virtual unsigned getNumValues() const { return 2; }
virtual const char *getValue(const ArgList &Args, unsigned N=0) const;
- static bool classof(const Arg *A) {
- return A->getKind() == Arg::JoinedAndSeparateClass;
+ static bool classof(const Arg *A) {
+ return A->getKind() == Arg::JoinedAndSeparateClass;
}
static bool classof(const JoinedAndSeparateArg *) { return true; }
};
diff --git a/include/clang/Driver/ArgList.h b/include/clang/Driver/ArgList.h
index ea8846a6e9..81588a5994 100644
--- a/include/clang/Driver/ArgList.h
+++ b/include/clang/Driver/ArgList.h
@@ -65,17 +65,17 @@ namespace driver {
const_iterator begin() const { return Args.begin(); }
const_iterator end() const { return Args.end(); }
-
+
const_reverse_iterator rbegin() const { return Args.rbegin(); }
const_reverse_iterator rend() const { return Args.rend(); }
/// 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 {
+ bool hasArg(options::ID Id, bool Claim=true) const {
return getLastArg(Id, Claim) != 0;
}
- bool hasArg(options::ID Id0, options::ID Id1, bool Claim=true) const {
+ bool hasArg(options::ID Id0, options::ID Id1, bool Claim=true) const {
return getLastArg(Id0, Id1, Claim) != 0;
}
@@ -105,15 +105,15 @@ namespace driver {
/// AddAllArgs - Render all arguments matching the given ids.
void AddAllArgs(ArgStringList &Output, options::ID Id0) const;
- void AddAllArgs(ArgStringList &Output, options::ID Id0,
+ void AddAllArgs(ArgStringList &Output, options::ID Id0,
options::ID Id1) const;
- void AddAllArgs(ArgStringList &Output, options::ID Id0, options::ID Id1,
+ void AddAllArgs(ArgStringList &Output, options::ID Id0, options::ID Id1,
options::ID 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,
+ void AddAllArgValues(ArgStringList &Output, options::ID Id0,
options::ID Id1) const;
/// AddAllArgsTranslated - Render all the arguments matching the
@@ -123,7 +123,7 @@ namespace driver {
/// \param Joined - If true, render the argument as joined with
/// the option specifier.
void AddAllArgsTranslated(ArgStringList &Output, options::ID Id0,
- const char *Translation,
+ const char *Translation,
bool Joined = false) const;
/// ClaimAllArgs - Claim all arguments which match the given
@@ -168,8 +168,8 @@ namespace driver {
InputArgList(const ArgList &);
~InputArgList();
- virtual const char *getArgString(unsigned Index) const {
- return ArgStrings[Index];
+ virtual const char *getArgString(unsigned Index) const {
+ return ArgStrings[Index];
}
/// getNumInputArgStrings - Return the number of original input
@@ -212,7 +212,7 @@ namespace driver {
~DerivedArgList();
virtual const char *getArgString(unsigned Index) const {
- return BaseArgs.getArgString(Index);
+ return BaseArgs.getArgString(Index);
}
/// @name Arg Synthesis
@@ -226,17 +226,17 @@ namespace driver {
/// MakePositionalArg - Construct a new Positional arg for the
/// given option \arg Id, with the provided \arg Value.
- Arg *MakePositionalArg(const Arg *BaseArg, const Option *Opt,
+ Arg *MakePositionalArg(const Arg *BaseArg, const Option *Opt,
const char *Value) const;
/// MakeSeparateArg - Construct a new Positional arg for the
/// given option \arg Id, with the provided \arg Value.
- Arg *MakeSeparateArg(const Arg *BaseArg, const Option *Opt,
+ Arg *MakeSeparateArg(const Arg *BaseArg, const Option *Opt,
const char *Value) const;
/// MakeJoinedArg - Construct a new Positional arg for the
/// given option \arg Id, with the provided \arg Value.
- Arg *MakeJoinedArg(const Arg *BaseArg, const Option *Opt,
+ Arg *MakeJoinedArg(const Arg *BaseArg, const Option *Opt,
const char *Value) const;
/// @}
diff --git a/include/clang/Driver/Compilation.h b/include/clang/Driver/Compilation.h
index 6414ef1369..9e026b91ef 100644
--- a/include/clang/Driver/Compilation.h
+++ b/include/clang/Driver/Compilation.h
@@ -56,7 +56,7 @@ class Compilation {
ArgStringList ResultFiles;
public:
- Compilation(const Driver &D, const ToolChain &DefaultToolChain,
+ Compilation(const Driver &D, const ToolChain &DefaultToolChain,
InputArgList *Args);
~Compilation();
@@ -83,8 +83,8 @@ public:
/// addTempFile - Add a file to remove on exit, and returns its
/// argument.
- const char *addTempFile(const char *Name) {
- TempFiles.push_back(Name);
+ const char *addTempFile(const char *Name) {
+ TempFiles.push_back(Name);
return Name;
}
@@ -99,7 +99,7 @@ public:
///
/// \param IssueErrors - Report failures as errors.
/// \return Whether all files were removed successfully.
- bool CleanupFileList(const ArgStringList &Files,
+ bool CleanupFileList(const ArgStringList &Files,
bool IssueErrors=false) const;
/// PrintJob - Print one job in -### format.
@@ -108,7 +108,7 @@ public:
/// \param J - The job to print.
/// \param Terminator - A string to print at the end of the line.
/// \param Quote - Should separate arguments be quoted.
- void PrintJob(llvm::raw_ostream &OS, const Job &J,
+ void PrintJob(llvm::raw_ostream &OS, const Job &J,
const char *Terminator, bool Quote) const;
/// ExecuteCommand - Execute an actual command.
diff --git a/include/clang/Driver/Driver.h b/include/clang/Driver/Driver.h
index bdc6f3b18a..c18d9e0c46 100644
--- a/include/clang/Driver/Driver.h
+++ b/include/clang/Driver/Driver.h
@@ -55,11 +55,11 @@ public:
public:
/// The name the driver was invoked as.
std::string Name;
-
+
/// The path the driver executable was in, as invoked from the
/// command line.
std::string Dir;
-
+
/// Default host triple.
std::string DefaultHostTriple;
@@ -75,7 +75,7 @@ public:
/// Whether the driver should follow g++ like behavior.
bool CCCIsCXX : 1;
-
+
/// Echo commands while executing (in -v style).
bool CCCEcho : 1;
@@ -107,7 +107,7 @@ private:
/// Certain options suppress the 'no input files' warning.
bool SuppressMissingInputWarning : 1;
-
+
std::list<std::string> TempFiles;
std::list<std::string> ResultFiles;
@@ -243,7 +243,7 @@ public:
/// \param BaseInput - The original input file that this action was
/// triggered by.
/// \param AtTopLevel - Whether this is a "top-level" action.
- const char *GetNamedOutputPath(Compilation &C,
+ const char *GetNamedOutputPath(Compilation &C,
const JobAction &JA,
const char *BaseInput,
bool AtTopLevel) const;
@@ -253,14 +253,14 @@ public:
///
/// GCC goes to extra lengths here to be a bit more robust.
std::string GetTemporaryPath(const char *Suffix) const;
-
+
/// GetHostInfo - Construct a new host info object for the given
/// host triple.
const HostInfo *GetHostInfo(const char *HostTriple) const;
/// ShouldUseClangCompilar - Should the clang compiler be used to
/// handle this action.
- bool ShouldUseClangCompiler(const Compilation &C, const JobAction &JA,
+ bool ShouldUseClangCompiler(const Compilation &C, const JobAction &JA,
const llvm::Triple &ArchName) const;
/// @}
@@ -272,7 +272,7 @@ public:
/// \return True if the entire string was parsed (9.2), or all
/// groups were parsed (10.3.5extrastuff). HadExtra is true if all
/// groups were parsed but extra characters remain at the end.
- static bool GetReleaseVersion(const char *Str, unsigned &Major,
+ static bool GetReleaseVersion(const char *Str, unsigned &Major,
unsigned &Minor, unsigned &Micro,
bool &HadExtra);
};
diff --git a/include/clang/Driver/DriverDiagnostic.h b/include/clang/Driver/DriverDiagnostic.h
index 705c3422cd..d4a9da7b6d 100644
--- a/include/clang/Driver/DriverDiagnostic.h
+++ b/include/clang/Driver/DriverDiagnostic.h
@@ -13,7 +13,7 @@
#include "clang/Basic/Diagnostic.h"
namespace clang {
- namespace diag {
+ namespace diag {
enum {
#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,SFINAE) ENUM,
#define DRIVERSTART
diff --git a/include/clang/Driver/HostInfo.h b/include/clang/Driver/HostInfo.h
index caffaeca36..bf67c343f3 100644
--- a/include/clang/Driver/HostInfo.h
+++ b/include/clang/Driver/HostInfo.h
@@ -22,7 +22,7 @@ namespace driver {
/// HostInfo - Config information about a particular host which may interact
/// with driver behavior.
-///
+///
/// The host information is used for controlling the parts of the driver which
/// interact with the platform the driver is ostensibly being run from. For
/// testing purposes, the HostInfo used by the driver may differ from the actual
@@ -38,7 +38,7 @@ public:
virtual ~HostInfo();
const Driver &getDriver() const { return TheDriver; }
-
+
const llvm::Triple& getTriple() const { return Triple; }
std::string getArchName() const { return Triple.getArchName(); }
std::string getPlatformName() const { return Triple.getVendorName(); }
@@ -64,23 +64,23 @@ public:
// FIXME: Pin down exactly what the HostInfo is allowed to use Args
// for here. Currently this is for -m32 / -m64 defaulting.
- virtual ToolChain *CreateToolChain(const ArgList &Args,
+ virtual ToolChain *CreateToolChain(const ArgList &Args,
const char *ArchName=0) const = 0;
};
const HostInfo *createAuroraUXHostInfo(const Driver &D,
const llvm::Triple& Triple);
-const HostInfo *createDarwinHostInfo(const Driver &D,
+const HostInfo *createDarwinHostInfo(const Driver &D,
const llvm::Triple& Triple);
-const HostInfo *createOpenBSDHostInfo(const Driver &D,
+const HostInfo *createOpenBSDHostInfo(const Driver &D,
const llvm::Triple& Triple);
-const HostInfo *createFreeBSDHostInfo(const Driver &D,
+const HostInfo *createFreeBSDHostInfo(const Driver &D,
const llvm::Triple& Triple);
-const HostInfo *createDragonFlyHostInfo(const Driver &D,
+const HostInfo *createDragonFlyHostInfo(const Driver &D,
const llvm::Triple& Triple);
-const HostInfo *createLinuxHostInfo(const Driver &D,
+const HostInfo *createLinuxHostInfo(const Driver &D,
const llvm::Triple& Triple);
-const HostInfo *createUnknownHostInfo(const Driver &D,
+const HostInfo *createUnknownHostInfo(const Driver &D,
const llvm::Triple& Triple);
} // end namespace driver
diff --git a/include/clang/Driver/Job.h b/include/clang/Driver/Job.h
index a23babdbb3..906d73128b 100644
--- a/include/clang/Driver/Job.h
+++ b/include/clang/Driver/Job.h
@@ -46,7 +46,7 @@ public:
/// either a piped job or a job list.
void addCommand(Command *C);
- static bool classof(const Job *) { return true; }
+ static bool classof(const Job *) { return true; }
};
/// Command - An executable path/name and argument vector to
@@ -63,7 +63,7 @@ class Command : public Job {
ArgStringList Arguments;
public:
- Command(const Action &_Source, const char *_Executable,
+ Command(const Action &_Source, const char *_Executable,
const ArgStringList &_Arguments);
/// getSource - Return the Action which caused the creation of this job.
@@ -73,8 +73,8 @@ public:
const ArgStringList &getArguments() const { return Arguments; }
- static bool classof(const Job *J) {
- return J->getKind() == CommandClass;
+ static bool classof(const Job *J) {
+ return J->getKind() == CommandClass;
}
static bool classof(const Command *) { return true; }
};
@@ -97,15 +97,15 @@ public:
void addCommand(Command *C) { Commands.push_back(C); }
const list_type &getCommands() const { return Commands; }
-
+
size_type size() const { return Commands.size(); }
iterator begin() { return Commands.begin(); }
const_iterator begin() const { return Commands.begin(); }
iterator end() { return Commands.end(); }
const_iterator end() const { return Commands.end(); }
- static bool classof(const Job *J) {
- return J->getKind() == PipedJobClass;
+ static bool classof(const Job *J) {
+ return J->getKind() == PipedJobClass;
}
static bool classof(const PipedJob *) { return true; }
};
@@ -133,13 +133,13 @@ public:
const_iterator begin() const { return Jobs.begin(); }
iterator end() { return Jobs.end(); }
const_iterator end() const { return Jobs.end(); }
-
- static bool classof(const Job *J) {
- return J->getKind() == JobListClass;
+
+ static bool classof(const Job *J) {
+ return J->getKind() == JobListClass;
}
static bool classof(const JobList *) { return true; }
};
-
+
} // end namespace driver
} // end namespace clang
diff --git a/include/clang/Driver/Option.h b/include/clang/Driver/Option.h
index c59faef897..c70b648216 100644
--- a/include/clang/Driver/Option.h
+++ b/include/clang/Driver/Option.h
@@ -24,7 +24,7 @@ namespace driver {
class Arg;
class InputArgList;
class OptionGroup;
-
+
/// Option - Abstract representation for a single form of driver
/// argument.
///
@@ -57,10 +57,10 @@ namespace driver {
options::ID ID;
/// The option name.
- const char *Name;
+ const char *Name;
/// Group this option is a member of, if any.
- const OptionGroup *Group;
+ const OptionGroup *Group;
/// Option that this is an alias for, if any.
const Option *Alias;
@@ -70,7 +70,7 @@ namespace driver {
/// Treat this option like a linker input?
bool LinkerInput : 1;
-
+
/// When rendering as an input, don't render the option.
// FIXME: We should ditch the render/renderAsInput distinction.
@@ -78,18 +78,18 @@ namespace driver {
/// Always render this option as separate form its value.
bool ForceSeparateRender : 1;
-
+
/// Always render this option joined with its value.
- bool ForceJoinedRender : 1;
+ bool ForceJoinedRender : 1;
/// This option is only consumed by the driver.
- bool DriverOption : 1;
+ bool DriverOption : 1;
/// This option should not report argument unused errors.
- bool NoArgumentUnused : 1;
+ bool NoArgumentUnused : 1;
protected:
- Option(OptionClass Kind, options::ID ID, const char *Name,
+ Option(OptionClass Kind, options::ID ID, const char *Name,
const OptionGroup *Group, const Option *Alias);
public:
virtual ~Option();
@@ -108,13 +108,13 @@ namespace driver {
bool hasNoOptAsInput() const { return NoOptAsInput; }
void setNoOptAsInput(bool Value) { NoOptAsInput = Value; }
-
+
bool hasForceSeparateRender() const { return ForceSeparateRender; }
void setForceSeparateRender(bool Value) { ForceSeparateRender = Value; }
-
+
bool hasForceJoinedRender() const { return ForceJoinedRender; }
void setForceJoinedRender(bool Value) { ForceJoinedRender = Value; }
-
+
bool isDriverOption() const { return DriverOption; }
void setDriverOption(bool Value) { DriverOption = Value; }
@@ -125,7 +125,7 @@ namespace driver {
/// getUnaliasedOption - Return the final option this option
/// aliases (itself, if the option has no alias).
- const Option *getUnaliasedOption() const {
+ const Option *getUnaliasedOption() const {
if (Alias) return Alias->getUnaliasedOption();
return this;
}
@@ -149,12 +149,12 @@ namespace driver {
/// Index to the position where argument parsing should resume
/// (even if the argument is missing values).
virtual Arg *accept(const InputArgList &Args, unsigned &Index) const = 0;
-
+
void dump() const;
static bool classof(const Option *) { return true; }
};
-
+
/// OptionGroup - A set of options which are can be handled uniformly
/// by the driver.
class OptionGroup : public Option {
@@ -163,14 +163,14 @@ namespace driver {
virtual Arg *accept(const InputArgList &Args, unsigned &Index) const;
- static bool classof(const Option *O) {
- return O->getKind() == Option::GroupClass;
+ static bool classof(const Option *O) {
+ return O->getKind() == Option::GroupClass;
}
static bool classof(const OptionGroup *) { return true; }
};
-
+
// Dummy option classes.
-
+
/// InputOption - Dummy option class for representing driver inputs.
class InputOption : public Option {
public:
@@ -178,8 +178,8 @@ namespace driver {
virtual Arg *accept(const InputArgList &Args, unsigned &Index) const;
- static bool classof(const Option *O) {
- return O->getKind() == Option::InputClass;
+ static bool classof(const Option *O) {
+ return O->getKind() == Option::InputClass;
}
static bool classof(const InputOption *) { return true; }
};
@@ -191,8 +191,8 @@ namespace driver {
virtual Arg *accept(const InputArgList &Args, unsigned &Index) const;
- static bool classof(const Option *O) {
- return O->getKind() == Option::UnknownClass;
+ static bool classof(const Option *O) {
+ return O->getKind() == Option::UnknownClass;
}
static bool classof(const UnknownOption *) { return true; }
};
@@ -201,52 +201,52 @@ namespace driver {
class FlagOption : public Option {
public:
- FlagOption(options::ID ID, const char *Name, const OptionGroup *Group,
+ FlagOption(options::ID ID, const char *Name, const OptionGroup *Group,
const Option *Alias);
virtual Arg *accept(const InputArgList &Args, unsigned &Index) const;
- static bool classof(const Option *O) {
- return O->getKind() == Option::FlagClass;
+ static bool classof(const Option *O) {
+ return O->getKind() == Option::FlagClass;
}
static bool classof(const FlagOption *) { return true; }
};
class JoinedOption : public Option {
public:
- JoinedOption(options::ID ID, const char *Name, const OptionGroup *Group,
+ JoinedOption(options::ID ID, const char *Name, const OptionGroup *Group,
const Option *Alias);
virtual Arg *accept(const InputArgList &Args, unsigned &Index) const;
- static bool classof(const Option *O) {
- return O->getKind() == Option::JoinedClass;
+ static bool classof(const Option *O) {
+ return O->getKind() == Option::JoinedClass;
}
static bool classof(const JoinedOption *) { return true; }
};
class SeparateOption : public Option {
public:
- SeparateOption(options::ID ID, const char *Name, const OptionGroup *Group,
+ SeparateOption(options::ID ID, const char *Name, const OptionGroup *Group,
const Option *Alias);
virtual Arg *accept(const InputArgList &Args, unsigned &Index) const;
- static bool classof(const Option *O) {
- return O->getKind() == Option::SeparateClass;
+ static bool classof(const Option *O) {
+ return O->getKind() == Option::SeparateClass;
}
static bool classof(const SeparateOption *) { return true; }
};
class CommaJoinedOption : public Option {
public:
- CommaJoinedOption(options::ID ID, const char *Name,
+ CommaJoinedOption(options::ID ID, const char *Name,
const OptionGroup *Group, const Option *Alias);
virtual Arg *accept(const InputArgList &Args, unsigned &Index) const;
- static bool classof(const Option *O) {
- return O->getKind() == Option::CommaJoinedClass;
+ static bool classof(const Option *O) {
+ return O->getKind() == Option::CommaJoinedClass;
}
static bool classof(const CommaJoinedOption *) { return true; }
};
@@ -259,15 +259,15 @@ namespace driver {
unsigned NumArgs;
public:
- MultiArgOption(options::ID ID, const char *Name, const OptionGroup *Group,
+ MultiArgOption(options::ID ID, const char *Name, const OptionGroup *Group,
const Option *Alias, unsigned NumArgs);
unsigned getNumArgs() const { return NumArgs; }
virtual Arg *accept(const InputArgList &Args, unsigned &Index) const;
- static bool classof(const Option *O) {
- return O->getKind() == Option::MultiArgClass;
+ static bool classof(const Option *O) {
+ return O->getKind() == Option::MultiArgClass;
}
static bool classof(const MultiArgOption *) { return true; }
};
@@ -276,13 +276,13 @@ namespace driver {
/// prefixes its (non-empty) value, or is follwed by a value.
class JoinedOrSeparateOption : public Option {
public:
- JoinedOrSeparateOption(options::ID ID, const char *Name,
+ JoinedOrSeparateOption(options::ID ID, const char *Name,
const OptionGroup *Group, const Option *Alias);
virtual Arg *accept(const InputArgList &Args, unsigned &Index) const;
- static bool classof(const Option *O) {
- return O->getKind() == Option::JoinedOrSeparateClass;
+ static bool classof(const Option *O) {
+ return O->getKind() == Option::JoinedOrSeparateClass;
}
static bool classof(const JoinedOrSeparateOption *) { return true; }
};
@@ -291,13 +291,13 @@ namespace driver {
/// value and is followed by another value.
class JoinedAndSeparateOption : public Option {
public:
- JoinedAndSeparateOption(options::ID ID, const char *Name,
+ JoinedAndSeparateOption(options::ID ID, const char *Name,
const OptionGroup *Group, const Option *Alias);
virtual Arg *accept(const InputArgList &Args, unsigned &Index) const;
- static bool classof(const Option *O) {
- return O->getKind() == Option::JoinedAndSeparateClass;
+ static bool classof(const Option *O) {
+ return O->getKind() == Option::JoinedAndSeparateClass;
}
static bool classof(const JoinedAndSeparateOption *) { return true; }
};
diff --git a/include/clang/Driver/Options.h b/include/clang/Driver/Options.h
index 8b959d369c..7fcaf3f497 100644
--- a/include/clang/Driver/Options.h
+++ b/include/clang/Driver/Options.h
@@ -24,7 +24,7 @@ namespace options {
#undef OPTION
};
}
-