diff options
author | Chad Rosier <mcrosier@apple.com> | 2012-09-04 16:36:26 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2012-09-04 16:36:26 +0000 |
commit | 74f3716bc40bba2e4a3eb771109393bbd3346d1c (patch) | |
tree | ace5c908973506c5d2ce896477268de0399043de /clang/lib/AST/Stmt.cpp | |
parent | 5c8822d3ff61caa8b1533dd1a1bf75a42c7155b2 (diff) | |
download | bcm5719-llvm-74f3716bc40bba2e4a3eb771109393bbd3346d1c.tar.gz bcm5719-llvm-74f3716bc40bba2e4a3eb771109393bbd3346d1c.zip |
[ms-inline asm] Fix an illegal index and an 80-column violation.
llvm-svn: 163143
Diffstat (limited to 'clang/lib/AST/Stmt.cpp')
-rw-r--r-- | clang/lib/AST/Stmt.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/clang/lib/AST/Stmt.cpp b/clang/lib/AST/Stmt.cpp index dfe61f24298..8d93a261791 100644 --- a/clang/lib/AST/Stmt.cpp +++ b/clang/lib/AST/Stmt.cpp @@ -678,9 +678,9 @@ MSAsmStmt::MSAsmStmt(ASTContext &C, SourceLocation asmloc, ArrayRef<Expr*> inputexprs, ArrayRef<Expr*> outputexprs, StringRef asmstr, ArrayRef<StringRef> constraints, ArrayRef<StringRef> clobbers, SourceLocation endloc) - : AsmStmt(MSAsmStmtClass, asmloc, issimple, isvolatile, outputs.size(), inputs.size(), - clobbers.size()), LBraceLoc(lbraceloc), EndLoc(endloc), - AsmStr(asmstr.str()), NumAsmToks(asmtoks.size()) { + : AsmStmt(MSAsmStmtClass, asmloc, issimple, isvolatile, outputs.size(), + inputs.size(), clobbers.size()), LBraceLoc(lbraceloc), + EndLoc(endloc), AsmStr(asmstr.str()), NumAsmToks(asmtoks.size()) { assert (inputs.size() == inputexprs.size() && "Input expr size mismatch!"); assert (outputs.size() == outputexprs.size() && "Input expr size mismatch!"); @@ -689,14 +689,14 @@ MSAsmStmt::MSAsmStmt(ASTContext &C, SourceLocation asmloc, Names = new (C) IdentifierInfo*[NumExprs]; for (unsigned i = 0, e = NumOutputs; i != e; ++i) Names[i] = outputs[i]; - for (unsigned i = NumOutputs, e = NumExprs; i != e; ++i) - Names[i] = inputs[i]; + for (unsigned i = NumOutputs, j = 0, e = NumExprs; i != e; ++i, ++j) + Names[i] = inputs[j]; Exprs = new (C) Stmt*[NumExprs]; for (unsigned i = 0, e = NumOutputs; i != e; ++i) Exprs[i] = outputexprs[i]; - for (unsigned i = NumOutputs, e = NumExprs; i != e; ++i) - Exprs[i] = inputexprs[i]; + for (unsigned i = NumOutputs, j = 0, e = NumExprs; i != e; ++i, ++j) + Exprs[i] = inputexprs[j]; AsmToks = new (C) Token[NumAsmToks]; for (unsigned i = 0, e = NumAsmToks; i != e; ++i) |