diff options
author | Chad Rosier <mcrosier@apple.com> | 2012-09-04 16:39:38 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2012-09-04 16:39:38 +0000 |
commit | 21a37047e56d717c7979fa653c9f30aae468608d (patch) | |
tree | d5ab4f0070432b76dde7ec5406eeaefd0e03e78c /lib/Sema | |
parent | 12603e259170cd02084f51b17b43e9c9c4fce354 (diff) |
[ms-inline asm] The MCInstrDesc only tracks register definitions. For now,
assume that if the 1st operands is an expression and the instruction mayStore,
then it is a memory definition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163144 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema')
-rw-r--r-- | lib/Sema/SemaStmtAsm.cpp | 3 |
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"); |