[cfe-commits] r119300 - /cfe/trunk/lib/AST/ASTContext.cpp
Bob Wilson
bob.wilson at apple.com
Mon Nov 15 16:32:20 PST 2010
Author: bwilson
Date: Mon Nov 15 18:32:20 2010
New Revision: 119300
URL: http://llvm.org/viewvc/llvm-project?rev=119300&view=rev
Log:
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.
Modified:
cfe/trunk/lib/AST/ASTContext.cpp
Modified: cfe/trunk/lib/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=119300&r1=119299&r2=119300&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTContext.cpp (original)
+++ cfe/trunk/lib/AST/ASTContext.cpp Mon Nov 15 18:32:20 2010
@@ -1620,8 +1620,7 @@
// 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);
More information about the cfe-commits
mailing list