[TableGen] Put a space between '*' and description in the autogenerated tablegen...
[oota-llvm.git] / lib / TableGen / Record.cpp
index 2c9b0244957f43927e05b1e1c82ca90d59dee79b..9783922b966de3868dd45ba44a86f2e649ffb25a 100644 (file)
@@ -112,16 +112,16 @@ Init *BitRecTy::convertValue(IntInit *II) {
   return BitInit::get(Val != 0);
 }
 
-Init *BitRecTy::convertValue(TypedInit *VI) {
-  RecTy *Ty = VI->getType();
+Init *BitRecTy::convertValue(TypedInit *TI) {
+  RecTy *Ty = TI->getType();
   if (isa<BitRecTy>(Ty))
-    return VI;  // Accept variable if it is already of bit type!
+    return TI;  // Accept variable if it is already of bit type!
   if (auto *BitsTy = dyn_cast<BitsRecTy>(Ty))
     // Accept only bits<1> expression.
-    return BitsTy->getNumBits() == 1 ? VI : nullptr;
+    return BitsTy->getNumBits() == 1 ? TI : nullptr;
   // Ternary !if can be converted to bit, but only if both sides are
   // convertible to a bit.
-  if (TernOpInit *TOI = dyn_cast<TernOpInit>(VI)) {
+  if (TernOpInit *TOI = dyn_cast<TernOpInit>(TI)) {
     if (TOI->getOpcode() != TernOpInit::TernaryOp::IF)
       return nullptr;
     if (!TOI->getMHS()->convertInitializerTo(BitRecTy::get()) ||
@@ -163,9 +163,9 @@ Init *BitsRecTy::convertValue(UnsetInit *UI) {
   return BitsInit::get(NewBits);
 }
 
-Init *BitsRecTy::convertValue(BitInit *UI) {
+Init *BitsRecTy::convertValue(BitInit *BI) {
   if (Size != 1) return nullptr;  // Can only convert single bit.
-  return BitsInit::get(UI);
+  return BitsInit::get(BI);
 }
 
 /// canFitInBitfield - Return true if the number of bits is large enough to hold
@@ -200,15 +200,15 @@ Init *BitsRecTy::convertValue(BitsInit *BI) {
   return nullptr;
 }
 
-Init *BitsRecTy::convertValue(TypedInit *VI) {
-  if (Size == 1 && isa<BitRecTy>(VI->getType()))
-    return BitsInit::get(VI);
+Init *BitsRecTy::convertValue(TypedInit *TI) {
+  if (Size == 1 && isa<BitRecTy>(TI->getType()))
+    return BitsInit::get(TI);
 
-  if (VI->getType()->typeIsConvertibleTo(this)) {
+  if (TI->getType()->typeIsConvertibleTo(this)) {
     SmallVector<Init *, 16> NewBits(Size);
 
     for (unsigned i = 0; i != Size; ++i)
-      NewBits[i] = VarBitInit::get(VI, i);
+      NewBits[i] = VarBitInit::get(TI, i);
     return BitsInit::get(NewBits);
   }
 
@@ -247,16 +247,16 @@ bool IntRecTy::baseClassOf(const RecTy *RHS) const{
   return kind==BitRecTyKind || kind==BitsRecTyKind || kind==IntRecTyKind;
 }
 
-Init *StringRecTy::convertValue(UnOpInit *BO) {
-  if (BO->getOpcode() == UnOpInit::CAST) {
-    Init *L = BO->getOperand()->convertInitializerTo(this);
+Init *StringRecTy::convertValue(UnOpInit *UO) {
+  if (UO->getOpcode() == UnOpInit::CAST) {
+    Init *L = UO->getOperand()->convertInitializerTo(this);
     if (!L) return nullptr;
-    if (L != BO->getOperand())
+    if (L != UO->getOperand())
       return UnOpInit::get(UnOpInit::CAST, L, StringRecTy::get());
-    return BO;
+    return UO;
   }
 
-  return convertValue((TypedInit*)BO);
+  return convertValue((TypedInit*)UO);
 }
 
 Init *StringRecTy::convertValue(BinOpInit *BO) {
@@ -320,13 +320,13 @@ Init *DagRecTy::convertValue(TypedInit *TI) {
   return nullptr;
 }
 
-Init *DagRecTy::convertValue(UnOpInit *BO) {
-  if (BO->getOpcode() == UnOpInit::CAST) {
-    Init *L = BO->getOperand()->convertInitializerTo(this);
+Init *DagRecTy::convertValue(UnOpInit *UO) {
+  if (UO->getOpcode() == UnOpInit::CAST) {
+    Init *L = UO->getOperand()->convertInitializerTo(this);
     if (!L) return nullptr;
-    if (L != BO->getOperand())
-      return UnOpInit::get(UnOpInit::CAST, L, new DagRecTy);
-    return BO;
+    if (L != UO->getOperand())
+      return UnOpInit::get(UnOpInit::CAST, L, DagRecTy::get());
+    return UO;
   }
   return nullptr;
 }
@@ -337,7 +337,7 @@ Init *DagRecTy::convertValue(BinOpInit *BO) {
     Init *R = BO->getRHS()->convertInitializerTo(this);
     if (!L || !R) return nullptr;
     if (L != BO->getLHS() || R != BO->getRHS())
-      return BinOpInit::get(BinOpInit::CONCAT, L, R, new DagRecTy);
+      return BinOpInit::get(BinOpInit::CONCAT, L, R, DagRecTy::get());
     return BO;
   }
   return nullptr;
@@ -778,14 +778,14 @@ Init *UnOpInit::Fold(Record *CurRec, MultiClass *CurMultiClass) const {
   }
   case HEAD: {
     if (ListInit *LHSl = dyn_cast<ListInit>(LHS)) {
-      assert(!LHSl->empty() && "Empty list in car");
+      assert(!LHSl->empty() && "Empty list in head");
       return LHSl->getElement(0);
     }
     break;
   }
   case TAIL: {
     if (ListInit *LHSl = dyn_cast<ListInit>(LHS)) {
-      assert(!LHSl->empty() && "Empty list in cdr");
+      assert(!LHSl->empty() && "Empty list in tail");
       // Note the +1.  We can't just pass the result of getValues()
       // directly.
       return ListInit::get(LHSl->getValues().slice(1), LHSl->getType());