aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Sema/SemaStmtAsm.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaStmtAsm.cpp b/lib/Sema/SemaStmtAsm.cpp
index 2af2afe398..b6a4e62f95 100644
--- a/lib/Sema/SemaStmtAsm.cpp
+++ b/lib/Sema/SemaStmtAsm.cpp
@@ -624,7 +624,8 @@ StmtResult Sema::ActOnMSAsmStmt(SourceLocation AsmLoc,
ExprResult Result = ActOnIdExpression(getCurScope(), SS, Loc, Id,
false, false);
if (!Result.isInvalid()) {
- if (isDef) {
+ bool isMemDef = (i == 1) && Desc.mayStore();
+ if (isDef || isMemDef) {
Outputs.push_back(II);
OutputExprs.push_back(Result.take());
OutputConstraints.push_back("=r");