aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2010-11-12 17:24:49 +0000
committerBob Wilson <bob.wilson@apple.com>2010-11-12 17:24:49 +0000
commit4cfaa5d0675f248f7a30ef91f557cc4905d10b69 (patch)
tree0fbb9aa16f301e6c0f19174531c3b95b3d0bd59b /lib/CodeGen
parent491328c90c00ecad6ad27fa0ab3cdf9195a4a820 (diff)
Use ASTContext::getTypeInfo to find the vector element size.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118899 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/Mangle.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/CodeGen/Mangle.cpp b/lib/CodeGen/Mangle.cpp
index 8ee67e76e9..1b7cfa1c8c 100644
--- a/lib/CodeGen/Mangle.cpp
+++ b/lib/CodeGen/Mangle.cpp
@@ -1411,30 +1411,30 @@ bool CXXNameMangler::mangleNeonVectorType(const VectorType *T) {
QualType EltType = T->getElementType();
if (!EltType->isBuiltinType())
return false;
- unsigned EltBits = 0;
const char *EltName = 0;
if (T->getVectorKind() == VectorType::NeonPolyVector) {
switch (cast<BuiltinType>(EltType)->getKind()) {
- case BuiltinType::SChar: EltBits = 8; EltName = "poly8_t"; break;
- case BuiltinType::Short: EltBits = 16; EltName = "poly16_t"; break;
+ case BuiltinType::SChar: EltName = "poly8_t"; break;
+ case BuiltinType::Short: EltName = "poly16_t"; break;
default: return false;
}
} else {
switch (cast<BuiltinType>(EltType)->getKind()) {
- case BuiltinType::SChar: EltBits = 8; EltName = "int8_t"; break;
- case BuiltinType::UChar: EltBits = 8; EltName = "uint8_t"; break;
- case BuiltinType::Short: EltBits = 16; EltName = "int16_t"; break;
- case BuiltinType::UShort: EltBits = 16; EltName = "uint16_t"; break;
- case BuiltinType::Int: EltBits = 32; EltName = "int32_t"; break;
- case BuiltinType::UInt: EltBits = 32; EltName = "uint32_t"; break;
- case BuiltinType::LongLong: EltBits = 64; EltName = "int64_t"; break;
- case BuiltinType::ULongLong: EltBits = 64; EltName = "uint64_t"; break;
- case BuiltinType::Float: EltBits = 32; EltName = "float32_t"; break;
+ case BuiltinType::SChar: EltName = "int8_t"; break;
+ case BuiltinType::UChar: EltName = "uint8_t"; break;
+ case BuiltinType::Short: EltName = "int16_t"; break;
+ case BuiltinType::UShort: EltName = "uint16_t"; break;
+ case BuiltinType::Int: EltName = "int32_t"; break;
+ case BuiltinType::UInt: EltName = "uint32_t"; break;
+ case BuiltinType::LongLong: EltName = "int64_t"; break;
+ case BuiltinType::ULongLong: EltName = "uint64_t"; break;
+ case BuiltinType::Float: EltName = "float32_t"; break;
default: return false;
}
}
const char *BaseName = 0;
- unsigned BitSize = T->getNumElements() * EltBits;
+ unsigned BitSize = (T->getNumElements() *
+ getASTContext().getTypeInfo(EltType).first);
if (BitSize == 64)
BaseName = "__simd64_";
else if (BitSize == 128)