r349603 - Revert accidentally included code.

Bill Wendling via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 18 20:36:42 PST 2018


Author: void
Date: Tue Dec 18 20:36:42 2018
New Revision: 349603

URL: http://llvm.org/viewvc/llvm-project?rev=349603&view=rev
Log:
Revert accidentally included code.

Modified:
    cfe/trunk/lib/Sema/SemaStmtAsm.cpp

Modified: cfe/trunk/lib/Sema/SemaStmtAsm.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaStmtAsm.cpp?rev=349603&r1=349602&r2=349603&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaStmtAsm.cpp (original)
+++ cfe/trunk/lib/Sema/SemaStmtAsm.cpp Tue Dec 18 20:36:42 2018
@@ -378,17 +378,17 @@ StmtResult Sema::ActOnGCCAsmStmt(SourceL
                          << InputExpr->getSourceRange());
     } else if (Info.requiresImmediateConstant() && !Info.allowsRegister()) {
       if (!InputExpr->isValueDependent()) {
-        llvm::SmallVector<PartialDiagnosticAt, 1> Diags;
-        llvm::APSInt Result = InputExpr->EvaluateKnownConstInt(Context, &Diags);
-        if (!Diags.empty())
+        Expr::EvalResult EVResult;
+        if (!InputExpr->EvaluateAsInt(EVResult, Context))
           return StmtError(
               Diag(InputExpr->getBeginLoc(), diag::err_asm_immediate_expected)
               << Info.getConstraintStr() << InputExpr->getSourceRange());
-        if (!Info.isValidAsmImmediate(Result))
-          return StmtError(Diag(InputExpr->getBeginLoc(),
-                                diag::err_invalid_asm_value_for_constraint)
-                           << Result.toString(10) << 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)
+                            << Result.toString(10) << Info.getConstraintStr()
+                            << InputExpr->getSourceRange());
       }
 
     } else {




More information about the cfe-commits mailing list