Minor simplifications.
authorMikhail Glushenkov <foldr@codedgers.com>
Fri, 1 Jan 2010 03:50:51 +0000 (03:50 +0000)
committerMikhail Glushenkov <foldr@codedgers.com>
Fri, 1 Jan 2010 03:50:51 +0000 (03:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92390 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvmc/plugins/Base/Base.td.in
utils/TableGen/LLVMCConfigurationEmitter.cpp

index 1413593bdfec5943c8fb1eb5281a868932984073..72623721cdb777a589d07ffdb506dc83d7cecac7 100644 (file)
@@ -97,11 +97,10 @@ def Preprocess : OptionPreprocessor<
            (unset_option ["O0", "O1", "O2"]),
       (and (switch_on "O2"), (any_switch_on ["O0", "O1"])),
            (unset_option ["O0", "O1"]),
-      (and (switch_on "O1"), (switch_on "O0")),
+      (switch_on ["O1", "O0"]),
            (unset_option "O0"))
 >;
 
-
 // Tools
 
 class llvm_gcc_based <string cmd_prefix, string in_lang, string E_ext> : Tool<
index 1c7e5d0891fcecd92f00ff4a76c9dbbe1827e7f4..42cedf2c69069cb2d923dab3025f8ba76afbb8e6 100644 (file)
@@ -1240,7 +1240,7 @@ bool EmitCaseTest1ArgList(const std::string& TestName,
                           const DagInit& d,
                           const OptionDescriptions& OptDescs,
                           raw_ostream& O) {
-  const ListInit& L = *static_cast<ListInit*>(d.getArg(0));
+  const ListInit& L = InitPtrToList(d.getArg(0));
 
   if (TestName == "any_switch_on") {
     EmitListTest(L, "||", EmitSwitchOn(OptDescs), O);