aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Stmt.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2010-01-30 19:34:25 +0000
committerAnders Carlsson <andersca@mac.com>2010-01-30 19:34:25 +0000
commitfdba9c069023f686e2608affde02c82131ee1cf8 (patch)
tree5e1ed19e6c36f9ff7894e7f251bab93188f8240e /lib/AST/Stmt.cpp
parent83c021c6d33aa173cf1a6e3bc61006dabb042703 (diff)
Combine AsmStmt::setOutputsAndInputs and AsmStmt::setClobbers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94918 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Stmt.cpp')
-rw-r--r--lib/AST/Stmt.cpp22
1 files changed, 10 insertions, 12 deletions
diff --git a/lib/AST/Stmt.cpp b/lib/AST/Stmt.cpp
index 821bcb5106..577b0ac560 100644
--- a/lib/AST/Stmt.cpp
+++ b/lib/AST/Stmt.cpp
@@ -147,8 +147,6 @@ unsigned AsmStmt::getNumPlusOperands() const {
return Res;
}
-
-
Expr *AsmStmt::getInputExpr(unsigned i) {
return cast<Expr>(Exprs[i + NumOutputs]);
}
@@ -161,11 +159,13 @@ std::string AsmStmt::getInputConstraint(unsigned i) const {
}
-void AsmStmt::setOutputsAndInputs(unsigned NumOutputs,
- unsigned NumInputs,
- const std::string *Names,
- StringLiteral **Constraints,
- Stmt **Exprs) {
+void AsmStmt::setOutputsAndInputsAndClobbers(const std::string *Names,
+ StringLiteral **Constraints,
+ Stmt **Exprs,
+ unsigned NumOutputs,
+ unsigned NumInputs,
+ StringLiteral **Clobbers,
+ unsigned NumClobbers) {
this->NumOutputs = NumOutputs;
this->NumInputs = NumInputs;
this->Names.clear();
@@ -175,6 +175,9 @@ void AsmStmt::setOutputsAndInputs(unsigned NumOutputs,
Constraints, Constraints + NumOutputs + NumInputs);
this->Exprs.clear();
this->Exprs.insert(this->Exprs.end(), Exprs, Exprs + NumOutputs + NumInputs);
+
+ this->Clobbers.clear();
+ this->Clobbers.insert(this->Clobbers.end(), Clobbers, Clobbers + NumClobbers);
}
/// getNamedOperand - Given a symbolic operand reference like %[foo],
@@ -197,11 +200,6 @@ int AsmStmt::getNamedOperand(const std::string &SymbolicName) const {
return -1;
}
-void AsmStmt::setClobbers(StringLiteral **Clobbers, unsigned NumClobbers) {
- this->Clobbers.clear();
- this->Clobbers.insert(this->Clobbers.end(), Clobbers, Clobbers + NumClobbers);
-}
-
/// AnalyzeAsmString - Analyze the asm string of the current asm, decomposing
/// it into pieces. If the asm string is erroneous, emit errors and return
/// true, otherwise return false.