Simplify a bit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90785 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/utils/TableGen/LLVMCConfigurationEmitter.cpp b/utils/TableGen/LLVMCConfigurationEmitter.cpp
index 2453035..613ae03 100644
--- a/utils/TableGen/LLVMCConfigurationEmitter.cpp
+++ b/utils/TableGen/LLVMCConfigurationEmitter.cpp
@@ -1823,20 +1823,17 @@
   {
     checkNumberOfArguments(&Dag, 1);
     const std::string& Name = InitPtrToString(Dag.getArg(0));
-    const OptionDescription& D = OptDescs.FindOption(Name);
+    const OptionDescription& D = OptDescs.FindListOrParameter(Name);
 
     if (D.isParameter()) {
       O.indent(IndentLevel) << "vec.push_back("
                             << D.GenVariableName() << ");\n";
     }
-    else if (D.isList()) {
+    else {
       O.indent(IndentLevel) << "std::copy(" << D.GenVariableName()
                             << ".begin(), " << D.GenVariableName()
                             << ".end(), std::back_inserter(vec));\n";
     }
-    else {
-      throw "'forward_value' used with a switch or an alias!";
-    }
   }
 
   void onForwardTransformedValue (const DagInit& Dag,
@@ -1845,15 +1842,10 @@
     checkNumberOfArguments(&Dag, 2);
     const std::string& Name = InitPtrToString(Dag.getArg(0));
     const std::string& Hook = InitPtrToString(Dag.getArg(1));
-    const OptionDescription& D = OptDescs.FindOption(Name);
+    const OptionDescription& D = OptDescs.FindListOrParameter(Name);
 
-    if (D.isParameter() || D.isList()) {
-      O.indent(IndentLevel) << "vec.push_back(" << "hooks::"
-                            << Hook << "(" << D.GenVariableName() << "));\n";
-    }
-    else {
-      throw "'forward_transformed_value' used with a switch or an alias!";
-    }
+    O.indent(IndentLevel) << "vec.push_back(" << "hooks::"
+                          << Hook << "(" << D.GenVariableName() << "));\n";
   }