summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2010-11-16 00:32:20 +0000
committerBob Wilson <bob.wilson@apple.com>2010-11-16 00:32:20 +0000
commit7795480992146e3099a6a7fb3e7c161ebc24d9f2 (patch)
tree32cb6d59b404f1a02be495d70ede5251ba1e236a /clang/lib
parente4652b1f22014cf8d9e52689f681e20c506e13d8 (diff)
downloadbcm5719-llvm-7795480992146e3099a6a7fb3e7c161ebc24d9f2.tar.gz
bcm5719-llvm-7795480992146e3099a6a7fb3e7c161ebc24d9f2.zip
ASTContext::getVectorType should preserve the vector kind for canonical types.
This is needed for Neon types when it is most natural to define them in terms of a typedef. For example, Neon poly8_t is a typedef for "signed char", and we want to define polynomial vectors as vectors of that typedef. Without this change, the result will be a generic GCC-style vector. I think this is safe for other vector types as well, but I would appreciate a review of this. llvm-svn: 119300
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/AST/ASTContext.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 7b8223f4c60..6823fa08d3d 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -1620,8 +1620,7 @@ QualType ASTContext::getVectorType(QualType vecType, unsigned NumElts,
// so fill in the canonical type field.
QualType Canonical;
if (!vecType.isCanonical()) {
- Canonical = getVectorType(getCanonicalType(vecType), NumElts,
- VectorType::GenericVector);
+ Canonical = getVectorType(getCanonicalType(vecType), NumElts, VecKind);
// Get the new insert position for the node we care about.
VectorType *NewIP = VectorTypes.FindNodeOrInsertPos(ID, InsertPos);
OpenPOWER on IntegriCloud