[llvm-commits] CVS: llvm/tools/llvm2cpp/CppWriter.cpp

Reid Spencer reid at x10sys.com
Wed Feb 14 18:27:26 PST 2007



Changes in directory llvm/tools/llvm2cpp:

CppWriter.cpp updated: 1.38 -> 1.39
---
Log message:

For PR1195: http://llvm.org/PR1195 :
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.


---
Diffs of the changes:  (+8 -8)

 CppWriter.cpp |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)


Index: llvm/tools/llvm2cpp/CppWriter.cpp
diff -u llvm/tools/llvm2cpp/CppWriter.cpp:1.38 llvm/tools/llvm2cpp/CppWriter.cpp:1.39
--- llvm/tools/llvm2cpp/CppWriter.cpp:1.38	Mon Feb  5 15:19:13 2007
+++ llvm/tools/llvm2cpp/CppWriter.cpp	Wed Feb 14 20:26:10 2007
@@ -174,7 +174,7 @@
     case Type::StructTyID:   return "struct_"; 
     case Type::ArrayTyID:    return "array_"; 
     case Type::PointerTyID:  return "ptr_"; 
-    case Type::PackedTyID:   return "packed_"; 
+    case Type::VectorTyID:   return "packed_"; 
     case Type::OpaqueTyID:   return "opaque_"; 
     default:                 return "other_"; 
   }
@@ -338,7 +338,7 @@
     case Type::ArrayTyID:       prefix = "ArrayTy_"; break;
     case Type::PointerTyID:     prefix = "PointerTy_"; break;
     case Type::OpaqueTyID:      prefix = "OpaqueTy_"; break;
-    case Type::PackedTyID:      prefix = "PackedTy_"; break;
+    case Type::VectorTyID:      prefix = "PackedTy_"; break;
     default:                    prefix = "OtherTy_"; break; // prevent breakage
   }
 
@@ -512,12 +512,12 @@
       nl(Out);
       break;
     }
-    case Type::PackedTyID: {
-      const PackedType* PT = cast<PackedType>(Ty);
+    case Type::VectorTyID: {
+      const VectorType* PT = cast<VectorType>(Ty);
       const Type* ET = PT->getElementType();
       bool isForward = printTypeInternal(ET);
       std::string elemName(getCppName(ET));
-      Out << "PackedType* " << typeName << " = PackedType::get("
+      Out << "VectorType* " << typeName << " = VectorType::get("
           << elemName << (isForward ? "_fwd" : "") 
           << ", " << utostr(PT->getNumElements()) << ");";
       nl(Out);
@@ -560,7 +560,7 @@
       case Type::FunctionTyID: Out << "FunctionType"; break;
       case Type::ArrayTyID:    Out << "ArrayType"; break;
       case Type::StructTyID:   Out << "StructType"; break;
-      case Type::PackedTyID:   Out << "PackedType"; break;
+      case Type::VectorTyID:   Out << "VectorType"; break;
       case Type::PointerTyID:  Out << "PointerType"; break;
       case Type::OpaqueTyID:   Out << "OpaqueType"; break;
       default:                 Out << "NoSuchDerivedType"; break;
@@ -711,7 +711,7 @@
     }
     Out << "Constant* " << constName << " = ConstantStruct::get(" 
         << typeName << ", " << constName << "_fields);";
-  } else if (const ConstantPacked *CP = dyn_cast<ConstantPacked>(CV)) {
+  } else if (const ConstantVector *CP = dyn_cast<ConstantVector>(CV)) {
     Out << "std::vector<Constant*> " << constName << "_elems;";
     nl(Out);
     unsigned N = CP->getNumOperands();
@@ -721,7 +721,7 @@
           << getCppName(CP->getOperand(i)) << ");";
       nl(Out);
     }
-    Out << "Constant* " << constName << " = ConstantPacked::get(" 
+    Out << "Constant* " << constName << " = ConstantVector::get(" 
         << typeName << ", " << constName << "_elems);";
   } else if (isa<UndefValue>(CV)) {
     Out << "UndefValue* " << constName << " = UndefValue::get(" 






More information about the llvm-commits mailing list