Implement getFloatingRank() for extended vectors.

- I'm not sure this is appropriate, but it seems reasonable to be
   able to call getFloatingRank on anything which isFloatingType().

llvm-svn: 61758
This commit is contained in:
Daniel Dunbar 2009-01-05 22:14:37 +00:00
parent c0a190085d
commit a1f3441d50
1 changed files with 4 additions and 2 deletions

View File

@ -1394,8 +1394,7 @@ QualType ASTContext::getArrayDecayedType(QualType Ty) {
return PtrTy.getQualifiedType(PrettyArrayType->getIndexTypeQualifier());
}
QualType ASTContext::getBaseElementType(const VariableArrayType *VAT)
{
QualType ASTContext::getBaseElementType(const VariableArrayType *VAT) {
QualType ElemTy = VAT->getElementType();
if (const VariableArrayType *VAT = getAsVariableArrayType(ElemTy))
@ -1409,7 +1408,10 @@ QualType ASTContext::getBaseElementType(const VariableArrayType *VAT)
static FloatingRank getFloatingRank(QualType T) {
if (const ComplexType *CT = T->getAsComplexType())
return getFloatingRank(CT->getElementType());
if (const VectorType *VT = T->getAsExtVectorType())
return getFloatingRank(VT->getElementType());
assert(T->getAsBuiltinType() && "getFloatingRank(): not a floating type");
switch (T->getAsBuiltinType()->getKind()) {
default: assert(0 && "getFloatingRank(): not a floating type");
case BuiltinType::Float: return FloatRank;