Driver: Replace Option::ForwardToGCC by Option::DriverOption (which
matches the flag in Options.def).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67679 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/Driver/Option.h b/include/clang/Driver/Option.h
index 79b512e..c7b6d0e 100644
--- a/include/clang/Driver/Option.h
+++ b/include/clang/Driver/Option.h
@@ -82,8 +82,8 @@
     /// 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 @@
     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).
diff --git a/lib/Driver/OptTable.cpp b/lib/Driver/OptTable.cpp
index baaa886..2e44999 100644
--- a/lib/Driver/OptTable.cpp
+++ b/lib/Driver/OptTable.cpp
@@ -185,18 +185,13 @@
     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;
 }
 
diff --git a/lib/Driver/Option.cpp b/lib/Driver/Option.cpp
index 6ea02aa..6248548 100644
--- a/lib/Driver/Option.cpp
+++ b/lib/Driver/Option.cpp
@@ -21,7 +21,7 @@
   : 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