Add builtin type signature support for vector types. Add correct type signatures for a bunch of MMX builtins. We now parse all the intrinsics in mmintrin.h

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44357 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/AST/Builtins.cpp b/AST/Builtins.cpp
index 5a470ff..137f4ea 100644
--- a/AST/Builtins.cpp
+++ b/AST/Builtins.cpp
@@ -112,10 +112,10 @@
       Type = Context.ShortTy;
       break;
   case 'i':
-    if (Long)
-      Type = Unsigned ? Context.UnsignedLongTy : Context.LongTy;
-    else if (LongLong)
+    if (LongLong)
       Type = Unsigned ? Context.UnsignedLongLongTy : Context.LongLongTy;
+    else if (Long)
+      Type = Unsigned ? Context.UnsignedLongTy : Context.LongTy;
     else if (Unsigned)
       Type = Context.UnsignedIntTy;
     else 
@@ -137,10 +137,22 @@
   case 'F':
     Type = Context.getCFConstantStringType();
     break;
-  case 'V':
+  case 'a':
     Type = Context.getBuiltinVaListType();
     assert(!Type.isNull() && "builtin va list type not initialized!");
     break;
+  case 'V': {
+    char *End;
+    
+    unsigned NumElements = strtoul(Str, &End, 10);
+    assert(End != Str && "Missing vector size");
+    
+    Str = End;
+    
+    QualType ElementType = DecodeTypeFromStr(Str, Context);
+    Type = Context.getVectorType(ElementType, NumElements);
+    break;
+  }
   }
   
   Done = false;