Can't generate "bool" any more. Change to i1
authorReid Spencer <rspencer@reidspencer.com>
Sat, 13 Jan 2007 04:39:47 +0000 (04:39 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Sat, 13 Jan 2007 04:39:47 +0000 (04:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33179 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-upgrade/UpgradeLexer.l
tools/llvm-upgrade/UpgradeParser.y

index 5b575606ce127b96ebace1574cb74cce8529eff7..8b390458012e7d25f46e59cb5875068ca1064d5c 100644 (file)
@@ -145,7 +145,7 @@ x86_stdcallcc   { RET_TOK( X86_STDCALLCC_TOK); }
 x86_fastcallcc  { RET_TOK( X86_FASTCALLCC_TOK); }
 
 void            { RET_TY(VOID,VoidTy,"void",false); }
-bool            { RET_TY(BOOL,BoolTy,"bool",false); }
+bool            { RET_TY(BOOL,BoolTy,"i1",false); }
 sbyte           { RET_TY(SBYTE,SByteTy,"i8",true); }
 ubyte           { RET_TY(UBYTE,UByteTy,"i8",false); }
 short           { RET_TY(SHORT,ShortTy,"i16",true); }
index ed70cbbff2b2c2b2f5bc073e425947093186ce30..25211aaa21338cb0c4199c342d178f9d8efc4f0f 100644 (file)
@@ -1783,7 +1783,7 @@ InstVal : ArithmeticOps Types ValueRef ',' ValueRef {
     *$1 = getCompareOp(*$1, $2);
     *$1 += " " + $2->getNewTy() + " " + Name1 + ", " + Name2;
     $$.val = $1;
-    $$.type = TypeInfo::get("bool",BoolTy);
+    $$.type = TypeInfo::get("i1",BoolTy);
     $3.destroy(); $5.destroy();
   }
   | ICMP IPredicates Types ValueRef ',' ValueRef {
@@ -1791,7 +1791,7 @@ InstVal : ArithmeticOps Types ValueRef ',' ValueRef {
     std::string Name2 = getUniqueName($6.val, $3);
     *$1 += " " + *$2 + " " + $3->getNewTy() + " " + Name1 + "," + Name2;
     $$.val = $1;
-    $$.type = TypeInfo::get("bool",BoolTy);
+    $$.type = TypeInfo::get("i1",BoolTy);
     delete $2; $4.destroy(); $6.destroy();
   }
   | FCMP FPredicates Types ValueRef ',' ValueRef {
@@ -1799,7 +1799,7 @@ InstVal : ArithmeticOps Types ValueRef ',' ValueRef {
     std::string Name2 = getUniqueName($6.val, $3);
     *$1 += " " + *$2 + " " + $3->getNewTy() + " " + Name1 + "," + Name2;
     $$.val = $1;
-    $$.type = TypeInfo::get("bool",BoolTy);
+    $$.type = TypeInfo::get("i1",BoolTy);
     delete $2; $4.destroy(); $6.destroy();
   }
   | ShiftOps ResolvedVal ',' ResolvedVal {
@@ -1884,7 +1884,7 @@ InstVal : ArithmeticOps Types ValueRef ',' ValueRef {
       size_t pos = (*$6)[1].val->find(' ');
       assert(pos != std::string::npos && "no space?");
       *$$.val += (*$6)[1].val->substr(pos+1);
-      $$.type = TypeInfo::get("bool", BoolTy);
+      $$.type = TypeInfo::get("i1", BoolTy);
     } else {
       static unsigned upgradeCount = 1;
       if (*$4.val == "%llvm.va_start" || *$4.val == "%llvm.va_end") {