diff options
| author | Chad Rosier <mcrosier@apple.com> | 2012-08-23 20:00:18 +0000 |
|---|---|---|
| committer | Chad Rosier <mcrosier@apple.com> | 2012-08-23 20:00:18 +0000 |
| commit | 59df25b659da1ee2da21f137ecde1658475d8cad (patch) | |
| tree | 04569c4f1827a51a912bd82cbd53c915d6c2c9f9 | |
| parent | cfe38aab254ce54e7dc87bbd31ea1d0d10215fae (diff) | |
| download | bcm5719-llvm-59df25b659da1ee2da21f137ecde1658475d8cad.tar.gz bcm5719-llvm-59df25b659da1ee2da21f137ecde1658475d8cad.zip | |
[ms-inline asm] Remove an unused argument. This logic can now be reused by the
ms-style inline asms.
llvm-svn: 162463
| -rw-r--r-- | clang/lib/CodeGen/CGStmt.cpp | 11 | ||||
| -rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 6 |
2 files changed, 7 insertions, 10 deletions
diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp index 4c24d2b391d..c07fbf0454e 100644 --- a/clang/lib/CodeGen/CGStmt.cpp +++ b/clang/lib/CodeGen/CGStmt.cpp @@ -1323,8 +1323,7 @@ AddVariableConstraints(const std::string &Constraint, const Expr &AsmExpr, } llvm::Value* -CodeGenFunction::EmitAsmInputLValue(const AsmStmt &S, - const TargetInfo::ConstraintInfo &Info, +CodeGenFunction::EmitAsmInputLValue(const TargetInfo::ConstraintInfo &Info, LValue InputValue, QualType InputType, std::string &ConstraintStr) { llvm::Value *Arg; @@ -1353,7 +1352,7 @@ CodeGenFunction::EmitAsmInputLValue(const AsmStmt &S, return Arg; } -llvm::Value* CodeGenFunction::EmitAsmInput(const AsmStmt &S, +llvm::Value* CodeGenFunction::EmitAsmInput( const TargetInfo::ConstraintInfo &Info, const Expr *InputExpr, std::string &ConstraintStr) { @@ -1363,7 +1362,7 @@ llvm::Value* CodeGenFunction::EmitAsmInput(const AsmStmt &S, InputExpr = InputExpr->IgnoreParenNoopCasts(getContext()); LValue Dest = EmitLValue(InputExpr); - return EmitAsmInputLValue(S, Info, Dest, InputExpr->getType(), ConstraintStr); + return EmitAsmInputLValue(Info, Dest, InputExpr->getType(), ConstraintStr); } /// getAsmSrcLocInfo - Return the !srcloc metadata node to attach to an inline @@ -1511,7 +1510,7 @@ void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) { InOutConstraints += ','; const Expr *InputExpr = S.getOutputExpr(i); - llvm::Value *Arg = EmitAsmInputLValue(S, Info, Dest, InputExpr->getType(), + llvm::Value *Arg = EmitAsmInputLValue(Info, Dest, InputExpr->getType(), InOutConstraints); if (llvm::Type* AdjTy = @@ -1549,7 +1548,7 @@ void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) { *InputExpr->IgnoreParenNoopCasts(getContext()), Target, CGM, S); - llvm::Value *Arg = EmitAsmInput(S, Info, InputExpr, Constraints); + llvm::Value *Arg = EmitAsmInput(Info, InputExpr, Constraints); // If this input argument is tied to a larger output result, extend the // input to be the same size as the output. The LLVM backend wants to see diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index 0b7748b3c69..58555557822 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -2552,12 +2552,10 @@ private: SmallVector<llvm::Value*, 16> &Args, llvm::FunctionType *IRFuncTy); - llvm::Value* EmitAsmInput(const AsmStmt &S, - const TargetInfo::ConstraintInfo &Info, + llvm::Value* EmitAsmInput(const TargetInfo::ConstraintInfo &Info, const Expr *InputExpr, std::string &ConstraintStr); - llvm::Value* EmitAsmInputLValue(const AsmStmt &S, - const TargetInfo::ConstraintInfo &Info, + llvm::Value* EmitAsmInputLValue(const TargetInfo::ConstraintInfo &Info, LValue InputValue, QualType InputType, std::string &ConstraintStr); |

