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 { _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits