Support evaluation of vector constant expressions, and codegen of same.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62455 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 82c8ea0..cff01c6 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -2187,11 +2187,9 @@
 }
 
 bool Sema::CheckForConstantInitializer(Expr *Init, QualType DclT) {
-  Expr::EvalResult Result;
-
   Init = Init->IgnoreParens();
 
-  if (Init->Evaluate(Result, Context) && !Result.HasSideEffects)
+  if (Init->isEvaluatable(Context))
     return false;
 
   // Look through CXXDefaultArgExprs; they have no meaning in this context.