return Constraints[i + NumOutputs];
}
-
Expr *getInputExpr(unsigned i);
const Expr *getInputExpr(unsigned i) const {
/// This returns -1 if the operand name is invalid.
int getNamedOperand(const std::string &SymbolicName) const;
-
-
unsigned getNumClobbers() const { return Clobbers.size(); }
StringLiteral *getClobber(unsigned i) { return Clobbers[i]; }
const StringLiteral *getClobber(unsigned i) const { return Clobbers[i]; }
return Exprs.data() + NumOutputs;
}
- // Input name iterator.
-
- const std::string *begin_output_names() const {
- return &Names[0];
- }
-
- const std::string *end_output_names() const {
- return &Names[0] + NumOutputs;
- }
-
// Child iterators
virtual child_iterator child_begin();
for (unsigned i = 0, e = S.getNumOutputs(); i != e; i++) {
TargetInfo::ConstraintInfo Info(S.getOutputConstraint(i),
S.getOutputName(i));
- bool result = Target.validateOutputConstraint(Info);
- assert(result && "Failed to parse output constraint"); result=result;
+ assert(Target.validateOutputConstraint(Info) &&
+ "Failed to parse output constraint");
OutputConstraintInfos.push_back(Info);
}
for (unsigned i = 0, e = S.getNumInputs(); i != e; i++) {
TargetInfo::ConstraintInfo Info(S.getInputConstraint(i),
S.getInputName(i));
- bool result = Target.validateInputConstraint(OutputConstraintInfos.data(),
- S.getNumOutputs(),
- Info); result=result;
- assert(result && "Failed to parse input constraint");
+ assert(Target.validateInputConstraint(OutputConstraintInfos.data(),
+ S.getNumOutputs(),
+ Info) &&
+ "Failed to parse input constraint");
InputConstraintInfos.push_back(Info);
}
ASTOwningVector<&ActionBase::DeleteExpr> Constraints(getSema());
ASTOwningVector<&ActionBase::DeleteExpr> Exprs(getSema());
+ llvm::SmallVector<std::string, 4> Names;
+
OwningExprResult AsmString(SemaRef);
ASTOwningVector<&ActionBase::DeleteExpr> Clobbers(getSema());
// Go through the outputs.
for (unsigned I = 0, E = S->getNumOutputs(); I != E; ++I) {
+ Names.push_back(S->getOutputName(I));
+
// No need to transform the constraint literal.
Constraints.push_back(S->getOutputConstraintLiteral(I)->Retain());
// Go through the inputs.
for (unsigned I = 0, E = S->getNumInputs(); I != E; ++I) {
+ Names.push_back(S->getInputName(I));
+
// No need to transform the constraint literal.
Constraints.push_back(S->getInputConstraintLiteral(I)->Retain());
S->isVolatile(),
S->getNumOutputs(),
S->getNumInputs(),
- S->begin_output_names(),
+ Names.data(),
move_arg(Constraints),
move_arg(Exprs),
move(AsmString),