Driver: Replace Option::ForwardToGCC by Option::DriverOption (which

matches the flag in Options.def).

llvm-svn: 67679
This commit is contained in:
Daniel Dunbar 2009-03-25 06:08:46 +00:00
parent 24e7eade19
commit 0e378b1e26
3 changed files with 8 additions and 11 deletions

View File

@ -82,8 +82,8 @@ namespace driver {
/// Always render this option joined with its value.
bool ForceJoinedRender : 1;
/// Forward to generic GCC tools.
bool ForwardToGCC : 1;
/// This option is only for consumed by the driver.
bool DriverOption : 1;
protected:
Option(OptionClass Kind, options::ID ID, const char *Name,
@ -112,8 +112,10 @@ namespace driver {
bool hasForceJoinedRender() const { return ForceJoinedRender; }
void setForceJoinedRender(bool Value) { ForceJoinedRender = Value; }
bool hasForwardToGCC() const { return ForwardToGCC; }
void setForwardToGCC(bool Value) { ForwardToGCC = Value; }
bool isDriverOption() const { return DriverOption; }
void setDriverOption(bool Value) { DriverOption = Value; }
bool hasForwardToGCC() const { return !DriverOption && !LinkerInput; }
/// getUnaliasedOption - Return the final option this option
/// aliases (itself, if the option has no alias).

View File

@ -185,18 +185,13 @@ Option *OptTable::constructOption(options::ID id) const {
case 'S':
assert(info.Kind == Option::JoinedClass && "Invalid option.");
Opt->setForceSeparateRender(true); break;
case 'd': Opt->setForwardToGCC(false); break;
case 'd': Opt->setDriverOption(true); break;
case 'i': Opt->setNoOptAsInput(true); break;
case 'l': Opt->setLinkerInput(true); break;
case 'u': Opt->setUnsupported(true); break;
}
}
// Linker inputs shouldn't be forwarded to GCC as arguments (they
// will, however, be forwarded as inputs).
if (Opt->isLinkerInput())
Opt->setForwardToGCC(false);
return Opt;
}

View File

@ -21,7 +21,7 @@ Option::Option(OptionClass _Kind, options::ID _ID, const char *_Name,
: Kind(_Kind), ID(_ID), Name(_Name), Group(_Group), Alias(_Alias),
Unsupported(false), LinkerInput(false), NoOptAsInput(false),
ForceSeparateRender(false), ForceJoinedRender(false),
ForwardToGCC(true)
DriverOption(false)
{
// Multi-level aliases are not supported, and alias options cannot