Driver/OptParser: Add a NoForward flag to prevent forwarding certain options to
GCC.
 - Mark -Xclang and -mlinker-version= with it for now, although I am sure there
   are more.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111005 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/OptTable.cpp b/lib/Driver/OptTable.cpp
index 39530f2..3c36314 100644
--- a/lib/Driver/OptTable.cpp
+++ b/lib/Driver/OptTable.cpp
@@ -164,6 +164,8 @@
     Opt->setLinkerInput(true);
   if (info.Flags & NoArgumentUnused)
     Opt->setNoArgumentUnused(true);
+  if (info.Flags & NoForward)
+    Opt->setNoForward(true);
   if (info.Flags & RenderAsInput)
     Opt->setNoOptAsInput(true);
   if (info.Flags & RenderJoined) {
diff --git a/lib/Driver/Option.cpp b/lib/Driver/Option.cpp
index dd48af8..5396250 100644
--- a/lib/Driver/Option.cpp
+++ b/lib/Driver/Option.cpp
@@ -20,7 +20,7 @@
                const OptionGroup *_Group, const Option *_Alias)
   : Kind(_Kind), ID(_ID.getID()), Name(_Name), Group(_Group), Alias(_Alias),
     Unsupported(false), LinkerInput(false), NoOptAsInput(false),
-    DriverOption(false), NoArgumentUnused(false) {
+    DriverOption(false), NoArgumentUnused(false), NoForward(false) {
 
   // Multi-level aliases are not supported, and alias options cannot
   // have groups. This just simplifies option tracking, it is not an