diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-02-15 02:26:10 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-02-15 02:26:10 +0000 |
commit | 9d6565a5b1fbc4286d6ee638d8f47a3171a9ed7e (patch) | |
tree | 6bac879128a02cb08acd536416a5f2d32fb465a7 /tools/llvm2cpp/CppWriter.cpp | |
parent | b7d61101b1a9e28541470e05af1321fea76f08e5 (diff) |
For PR1195:
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34293 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm2cpp/CppWriter.cpp')
-rw-r--r-- | tools/llvm2cpp/CppWriter.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/llvm2cpp/CppWriter.cpp b/tools/llvm2cpp/CppWriter.cpp index 70f5626af0..05a85cf806 100644 --- a/tools/llvm2cpp/CppWriter.cpp +++ b/tools/llvm2cpp/CppWriter.cpp @@ -174,7 +174,7 @@ getTypePrefix(const Type* Ty ) { 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 @@ CppWriter::getCppName(const Type* Ty) 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 @@ CppWriter::printTypeInternal(const Type* Ty) { 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 @@ CppWriter::printTypeInternal(const Type* Ty) { 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 @@ void CppWriter::printConstant(const Constant *CV) { } 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 @@ void CppWriter::printConstant(const Constant *CV) { << 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(" |