diff options
| -rw-r--r-- | clang/lib/CodeGen/CGStmt.cpp | 3 | ||||
| -rw-r--r-- | clang/test/CodeGen/asm.c | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp index 8d80a498b45..bee40e5c28b 100644 --- a/clang/lib/CodeGen/CGStmt.cpp +++ b/clang/lib/CodeGen/CGStmt.cpp @@ -944,9 +944,10 @@ void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) { const Expr *InputExpr = S.getOutputExpr(i); llvm::Value *Arg = EmitAsmInput(S, Info, InputExpr, InOutConstraints); + InOutConstraints += llvm::utostr(Args.size()); + InOutArgTypes.push_back(Arg->getType()); InOutArgs.push_back(Arg); - InOutConstraints += OutputConstraint; } } diff --git a/clang/test/CodeGen/asm.c b/clang/test/CodeGen/asm.c new file mode 100644 index 00000000000..d6fbf774081 --- /dev/null +++ b/clang/test/CodeGen/asm.c @@ -0,0 +1,5 @@ +// RUN: clang %s -arch=i386 -verify -fsyntax-only +void f(int len) +{ + __asm__ volatile("" :"=&r"(len), "+&r"(len)); +} |

