Reinstate 347294 with a fix for the failures.

EvaluateAsInt() is sometimes called in a constant context. When that's the
case, we need to specify it as so.

llvm-svn: 347364
diff --git a/clang/lib/Sema/SemaStmtAsm.cpp b/clang/lib/Sema/SemaStmtAsm.cpp
index e6d9b34..d209266 100644
--- a/clang/lib/Sema/SemaStmtAsm.cpp
+++ b/clang/lib/Sema/SemaStmtAsm.cpp
@@ -378,11 +378,12 @@
                          << InputExpr->getSourceRange());
     } else if (Info.requiresImmediateConstant() && !Info.allowsRegister()) {
       if (!InputExpr->isValueDependent()) {
-        llvm::APSInt Result;
-        if (!InputExpr->EvaluateAsInt(Result, Context))
+        Expr::EvalResult EVResult;
+        if (!InputExpr->EvaluateAsInt(EVResult, Context))
           return StmtError(
               Diag(InputExpr->getBeginLoc(), diag::err_asm_immediate_expected)
               << Info.getConstraintStr() << InputExpr->getSourceRange());
+        llvm::APSInt Result = EVResult.Val.getInt();
          if (!Info.isValidAsmImmediate(Result))
            return StmtError(Diag(InputExpr->getBeginLoc(),
                                  diag::err_invalid_asm_value_for_constraint)