diff options
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGStmt.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp index bee40e5c28b..fd01905698a 100644 --- a/clang/lib/CodeGen/CGStmt.cpp +++ b/clang/lib/CodeGen/CGStmt.cpp @@ -944,7 +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()); + if (Info & TargetInfo::CI_AllowsRegister) + InOutConstraints += llvm::utostr(i); + else + InOutConstraints += OutputConstraint; InOutArgTypes.push_back(Arg->getType()); InOutArgs.push_back(Arg); |