aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Stmt.cpp
diff options
context:
space:
mode:
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.