diff options
author | Chad Rosier <mcrosier@apple.com> | 2012-09-11 23:53:48 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2012-09-11 23:53:48 +0000 |
commit | a4f52e16a5b24fd82e3743c26ee9997c620dc9d1 (patch) | |
tree | 3a33d156bc25510a5ba2ba9e8cade59806ba9d65 | |
parent | 911d50fe4ebc9ccb0d6ebdeb1cf81fa4dd9b4d62 (diff) | |
download | bcm5719-llvm-a4f52e16a5b24fd82e3743c26ee9997c620dc9d1.tar.gz bcm5719-llvm-a4f52e16a5b24fd82e3743c26ee9997c620dc9d1.zip |
[ms-inline asm] isDef/NumDefs in this context only refer to register definitions, not memory definitions.
llvm-svn: 163666
-rw-r--r-- | clang/lib/Sema/SemaStmtAsm.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaStmtAsm.cpp b/clang/lib/Sema/SemaStmtAsm.cpp index 2d20d6afcc5..3f57a6ec035 100644 --- a/clang/lib/Sema/SemaStmtAsm.cpp +++ b/clang/lib/Sema/SemaStmtAsm.cpp @@ -595,10 +595,9 @@ StmtResult Sema::ActOnMSAsmStmt(SourceLocation AsmLoc, } const llvm::MCOperand &Op = Inst.getOperand(MCIdx); - bool isDef = NumDefs && (MCIdx < NumDefs); // Register/Clobber. - if (Op.isReg() && isDef) { + if (Op.isReg() && NumDefs && (MCIdx < NumDefs)) { std::string Reg; llvm::raw_string_ostream OS(Reg); IP->printRegName(OS, Op.getReg()); @@ -628,7 +627,7 @@ StmtResult Sema::ActOnMSAsmStmt(SourceLocation AsmLoc, false, false); if (!Result.isInvalid()) { bool isMemDef = (i == 1) && Desc.mayStore(); - if (isDef || isMemDef) { + if (isMemDef) { Outputs.push_back(II); OutputExprs.push_back(Result.take()); OutputExprNames.push_back(Name.str()); |