Forward parameter options as '-option=parameter'.
authorMikhail Glushenkov <foldr@codedgers.com>
Sat, 13 Feb 2010 22:37:28 +0000 (22:37 +0000)
committerMikhail Glushenkov <foldr@codedgers.com>
Sat, 13 Feb 2010 22:37:28 +0000 (22:37 +0000)
Some tools do not like the '-option parameter' form. Should this be
configurable?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96130 91177308-0d34-0410-b5e6-96231b3b80d8

test/LLVMC/ForwardAs.td
utils/TableGen/LLVMCConfigurationEmitter.cpp

index ce6fbb06ef51f0b01386a87bcd9ffb7868efda80..28bba604091c41c65bb3a1bd78353feda66fc77b 100644 (file)
@@ -13,7 +13,7 @@ def dummy_tool : Tool<[
 (in_language "dummy"),
 (out_language "dummy"),
 (actions (case
-         // CHECK: vec.push_back("unique_name")
+         // CHECK: vec.push_back("unique_name
          (not_empty "dummy"), (forward_as "dummy", "unique_name")))
 ]>;
 
index 2abc94bbcdad2f4495b73ecc75ad27fb2ed26489..5558904d2916e54ad3a103c76c39a2d9108fc34d 100644 (file)
@@ -1792,8 +1792,8 @@ void EmitForwardOptionPropertyHandlingCode (const OptionDescription& D,
     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 << "=\" + "
+                          << D.GenVariableName() << ");\n";
     break;
   case OptionType::Prefix:
     O.indent(IndentLevel) << "vec.push_back(\"" << Name << "\" + "