OpenCL 1.0 Support, patch 1/N: upper case swizzle operator and hex element index.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74202 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp
index 4a3ad26..fce88cc 100644
--- a/lib/AST/Expr.cpp
+++ b/lib/AST/Expr.cpp
@@ -1496,7 +1496,7 @@
     return false;
   
   // Advance past s-char prefix on hex swizzles.
-  if (*compStr == 's') {
+  if (*compStr == 's' || *compStr == 'S') {
     compStr++;
     length--;
   }
@@ -1514,7 +1514,7 @@
 void ExtVectorElementExpr::getEncodedElementAccess(
                                   llvm::SmallVectorImpl<unsigned> &Elts) const {
   const char *compStr = Accessor->getName();
-  if (*compStr == 's')
+  if (*compStr == 's' || *compStr == 'S')
     compStr++;
  
   bool isHi =   !strcmp(compStr, "hi");
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 19fc090..5b65068 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -1905,7 +1905,7 @@
 
   // This flag determines whether or not CompName has an 's' char prefix,
   // indicating that it is a string of hex values to be used as vector indices.
-  bool HexSwizzle = *compStr == 's';
+  bool HexSwizzle = *compStr == 's' || *compStr == 'S';
 
   // Check that we've found one of the special components, or that the component
   // names must come from the same set.