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 | fed6699dd9d7b27bbbc52644cc14a855b09913c4 (patch) | |
tree | 7fc6c985dca9080536b541ac816d637dac52fcbf /clang/lib/AST/ASTContext.cpp | |
parent | 48687a5a00d1c985aeed2068249be59fa980eb46 (diff) | |
download | bcm5719-llvm-fed6699dd9d7b27bbbc52644cc14a855b09913c4.tar.gz bcm5719-llvm-fed6699dd9d7b27bbbc52644cc14a855b09913c4.zip |
Add ext_vector type code for builtins, from John Garvin!
llvm-svn: 158156
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r-- | clang/lib/AST/ASTContext.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index bd68d832500..47b286233e5 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/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); |