Add a way to enable '-opt=foo' forwarding.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96916 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/utils/TableGen/LLVMCConfigurationEmitter.cpp b/utils/TableGen/LLVMCConfigurationEmitter.cpp
index 2abc94b..9895260 100644
--- a/utils/TableGen/LLVMCConfigurationEmitter.cpp
+++ b/utils/TableGen/LLVMCConfigurationEmitter.cpp
@@ -229,7 +229,7 @@
   enum OptionDescriptionFlags { Required = 0x1, Hidden = 0x2,
                                 ReallyHidden = 0x4, Extern = 0x8,
                                 OneOrMore = 0x10, Optional = 0x20,
-                                CommaSeparated = 0x40 };
+                                CommaSeparated = 0x40, ForwardNotSplit = 0x80 };
 }
 
 /// OptionDescription - Represents data contained in a single
@@ -271,6 +271,9 @@
   bool isExtern() const;
   void setExtern();
 
+  bool isForwardNotSplit() const;
+  void setForwardNotSplit();
+
   bool isRequired() const;
   void setRequired();
 
@@ -327,6 +330,13 @@
   Flags |= OptionDescriptionFlags::CommaSeparated;
 }
 
+bool OptionDescription::isForwardNotSplit() const {
+  return Flags & OptionDescriptionFlags::ForwardNotSplit;
+}
+void OptionDescription::setForwardNotSplit() {
+  Flags |= OptionDescriptionFlags::ForwardNotSplit;
+}
+
 bool OptionDescription::isExtern() const {
   return Flags & OptionDescriptionFlags::Extern;
 }
@@ -586,6 +596,8 @@
       AddHandler("required", &CollectOptionProperties::onRequired);
       AddHandler("optional", &CollectOptionProperties::onOptional);
       AddHandler("comma_separated", &CollectOptionProperties::onCommaSeparated);
+      AddHandler("forward_not_split",
+                 &CollectOptionProperties::onForwardNotSplit);
 
       staticMembersInitialized_ = true;
     }
@@ -629,6 +641,13 @@
     optDesc_.setCommaSeparated();
   }
 
+  void onForwardNotSplit (const DagInit& d) {
+    CheckNumberOfArguments(d, 0);
+    if (!optDesc_.isParameter())
+      throw "'forward_not_split' is valid only for parameter options!";
+    optDesc_.setForwardNotSplit();
+  }
+
   void onRequired (const DagInit& d) {
     CheckNumberOfArguments(d, 0);
     if (optDesc_.isOneOrMore() || optDesc_.isOptional())
@@ -1792,8 +1811,16 @@
     O.indent(IndentLevel) << "vec.push_back(\"" << Name << "\");\n";
     break;
   case OptionType::Parameter:
-    O.indent(IndentLevel) << "vec.push_back(\"" << Name << "\");\n";
-    O.indent(IndentLevel) << "vec.push_back(" << D.GenVariableName() << ");\n";
+    O.indent(IndentLevel) << "vec.push_back(\"" << Name;
+
+    if (!D.isForwardNotSplit()) {
+      O << "\");\n";
+      O.indent(IndentLevel) << "vec.push_back("
+                            << D.GenVariableName() << ");\n";
+    }
+    else {
+      O << "=\" + " << D.GenVariableName() << ");\n";
+    }
     break;
   case OptionType::Prefix:
     O.indent(IndentLevel) << "vec.push_back(\"" << Name << "\" + "