[TableGen] Remove !! that I can't really explain why I wrote. Also remove some unnece...
authorCraig Topper <craig.topper@gmail.com>
Sat, 16 May 2015 05:42:11 +0000 (05:42 +0000)
committerCraig Topper <craig.topper@gmail.com>
Sat, 16 May 2015 05:42:11 +0000 (05:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237513 91177308-0d34-0410-b5e6-96231b3b80d8

lib/TableGen/Record.cpp

index 0ce7b6f..2c9b024 100644 (file)
@@ -793,12 +793,10 @@ Init *UnOpInit::Fold(Record *CurRec, MultiClass *CurMultiClass) const {
     break;
   }
   case EMPTY: {
-    if (ListInit *LHSl = dyn_cast<ListInit>(LHS)) {
-      return IntInit::get(!!LHSl->empty());
-    }
-    if (StringInit *LHSs = dyn_cast<StringInit>(LHS)) {
-      return IntInit::get(!!LHSs->getValue().empty());
-    }
+    if (ListInit *LHSl = dyn_cast<ListInit>(LHS))
+      return IntInit::get(LHSl->empty());
+    if (StringInit *LHSs = dyn_cast<StringInit>(LHS))
+      return IntInit::get(LHSs->getValue().empty());
 
     break;
   }