[llvm-commits] [llvm] r47805 - /llvm/trunk/lib/Target/CBackend/CBackend.cpp
Chris Lattner
sabre at nondot.org
Sat Mar 1 19:18:46 PST 2008
Author: lattner
Date: Sat Mar 1 21:18:46 2008
New Revision: 47805
URL: http://llvm.org/viewvc/llvm-project?rev=47805&view=rev
Log:
rename PT -> VT for VectorTypes.
Modified:
llvm/trunk/lib/Target/CBackend/CBackend.cpp
Modified: llvm/trunk/lib/Target/CBackend/CBackend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CBackend/CBackend.cpp?rev=47805&r1=47804&r2=47805&view=diff
==============================================================================
--- llvm/trunk/lib/Target/CBackend/CBackend.cpp (original)
+++ llvm/trunk/lib/Target/CBackend/CBackend.cpp Sat Mar 1 21:18:46 2008
@@ -518,10 +518,9 @@
}
case Type::VectorTyID: {
- const VectorType *PTy = cast<VectorType>(Ty);
- unsigned NumElements = PTy->getNumElements();
- if (NumElements == 0) NumElements = 1;
- return printType(Out, PTy->getElementType(), false,
+ const VectorType *VTy = cast<VectorType>(Ty);
+ unsigned NumElements = VTy->getNumElements();
+ return printType(Out, VTy->getElementType(), false,
NameSoFar + "[" + utostr(NumElements) + "]");
}
@@ -972,8 +971,8 @@
}
case Type::ArrayTyID:
- if (const ConstantArray *CA = cast<ConstantArray>(CPV)) {
- printConstantVector(CA);
+ if (ConstantArray *CA = cast<ConstantArray>(CPV)) {
+ printConstantArray(CA);
} else {
assert(isa<ConstantAggregateZero>(CPV) || isa<UndefValue>(CPV));
const ArrayType *AT = cast<ArrayType>(CPV->getType());
@@ -992,7 +991,7 @@
break;
case Type::VectorTyID:
- if (const ConstantVector *CV = cast<ConstantVector>(CPV)) {
+ if (ConstantVector *CV = cast<ConstantVector>(CPV)) {
printConstantVector(CV);
} else {
assert(isa<ConstantAggregateZero>(CPV) || isa<UndefValue>(CPV));
@@ -1000,7 +999,7 @@
Out << "{ ";
Constant *CZ = Constant::getNullValue(VT->getElementType());
printConstant(CZ);
- for (unsigned i = 1, e = AT->getNumElements(); i != e; ++i) {
+ for (unsigned i = 1, e = VT->getNumElements(); i != e; ++i) {
Out << ", ";
printConstant(CZ);
}
More information about the llvm-commits
mailing list