diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-06-07 18:08:25 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-06-07 18:08:25 +0000 |
commit | b4bc99ba5540a618c86c136c9112ead8fb1d9866 (patch) | |
tree | 57d10d23a5c8b9550867baf5a715ad04c4955f00 /lib/AST/ASTContext.cpp | |
parent | 41c2bcff88a23a046ee8d71451bc03717a4248f6 (diff) |
Add ext_vector type code for builtins, from John Garvin!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158156 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r-- | lib/AST/ASTContext.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index bd68d83250..47b286233e 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -6413,6 +6413,19 @@ static QualType DecodeTypeFromStr(const char *&Str, const ASTContext &Context, VectorType::GenericVector); break; } + case 'E': { + char *End; + + unsigned NumElements = strtoul(Str, &End, 10); + assert(End != Str && "Missing vector size"); + + Str = End; + + QualType ElementType = DecodeTypeFromStr(Str, Context, Error, RequiresICE, + false); + Type = Context.getExtVectorType(ElementType, NumElements); + break; + } case 'X': { QualType ElementType = DecodeTypeFromStr(Str, Context, Error, RequiresICE, false); |