forked from OSchip/llvm-project
parent
31a68e70a5
commit
087bc13d96
|
@ -1261,7 +1261,6 @@ public:
|
||||||
return Constraints[i + NumOutputs];
|
return Constraints[i + NumOutputs];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Expr *getInputExpr(unsigned i);
|
Expr *getInputExpr(unsigned i);
|
||||||
|
|
||||||
const Expr *getInputExpr(unsigned i) const {
|
const Expr *getInputExpr(unsigned i) const {
|
||||||
|
@ -1283,8 +1282,6 @@ public:
|
||||||
/// This returns -1 if the operand name is invalid.
|
/// This returns -1 if the operand name is invalid.
|
||||||
int getNamedOperand(const std::string &SymbolicName) const;
|
int getNamedOperand(const std::string &SymbolicName) const;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
unsigned getNumClobbers() const { return Clobbers.size(); }
|
unsigned getNumClobbers() const { return Clobbers.size(); }
|
||||||
StringLiteral *getClobber(unsigned i) { return Clobbers[i]; }
|
StringLiteral *getClobber(unsigned i) { return Clobbers[i]; }
|
||||||
const StringLiteral *getClobber(unsigned i) const { return Clobbers[i]; }
|
const StringLiteral *getClobber(unsigned i) const { return Clobbers[i]; }
|
||||||
|
@ -1336,16 +1333,6 @@ public:
|
||||||
return Exprs.data() + NumOutputs;
|
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
|
// Child iterators
|
||||||
|
|
||||||
virtual child_iterator child_begin();
|
virtual child_iterator child_begin();
|
||||||
|
|
|
@ -916,18 +916,18 @@ void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) {
|
||||||
for (unsigned i = 0, e = S.getNumOutputs(); i != e; i++) {
|
for (unsigned i = 0, e = S.getNumOutputs(); i != e; i++) {
|
||||||
TargetInfo::ConstraintInfo Info(S.getOutputConstraint(i),
|
TargetInfo::ConstraintInfo Info(S.getOutputConstraint(i),
|
||||||
S.getOutputName(i));
|
S.getOutputName(i));
|
||||||
bool result = Target.validateOutputConstraint(Info);
|
assert(Target.validateOutputConstraint(Info) &&
|
||||||
assert(result && "Failed to parse output constraint"); result=result;
|
"Failed to parse output constraint");
|
||||||
OutputConstraintInfos.push_back(Info);
|
OutputConstraintInfos.push_back(Info);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (unsigned i = 0, e = S.getNumInputs(); i != e; i++) {
|
for (unsigned i = 0, e = S.getNumInputs(); i != e; i++) {
|
||||||
TargetInfo::ConstraintInfo Info(S.getInputConstraint(i),
|
TargetInfo::ConstraintInfo Info(S.getInputConstraint(i),
|
||||||
S.getInputName(i));
|
S.getInputName(i));
|
||||||
bool result = Target.validateInputConstraint(OutputConstraintInfos.data(),
|
assert(Target.validateInputConstraint(OutputConstraintInfos.data(),
|
||||||
S.getNumOutputs(),
|
S.getNumOutputs(),
|
||||||
Info); result=result;
|
Info) &&
|
||||||
assert(result && "Failed to parse input constraint");
|
"Failed to parse input constraint");
|
||||||
InputConstraintInfos.push_back(Info);
|
InputConstraintInfos.push_back(Info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3352,6 +3352,8 @@ TreeTransform<Derived>::TransformAsmStmt(AsmStmt *S) {
|
||||||
|
|
||||||
ASTOwningVector<&ActionBase::DeleteExpr> Constraints(getSema());
|
ASTOwningVector<&ActionBase::DeleteExpr> Constraints(getSema());
|
||||||
ASTOwningVector<&ActionBase::DeleteExpr> Exprs(getSema());
|
ASTOwningVector<&ActionBase::DeleteExpr> Exprs(getSema());
|
||||||
|
llvm::SmallVector<std::string, 4> Names;
|
||||||
|
|
||||||
OwningExprResult AsmString(SemaRef);
|
OwningExprResult AsmString(SemaRef);
|
||||||
ASTOwningVector<&ActionBase::DeleteExpr> Clobbers(getSema());
|
ASTOwningVector<&ActionBase::DeleteExpr> Clobbers(getSema());
|
||||||
|
|
||||||
|
@ -3359,6 +3361,8 @@ TreeTransform<Derived>::TransformAsmStmt(AsmStmt *S) {
|
||||||
|
|
||||||
// Go through the outputs.
|
// Go through the outputs.
|
||||||
for (unsigned I = 0, E = S->getNumOutputs(); I != E; ++I) {
|
for (unsigned I = 0, E = S->getNumOutputs(); I != E; ++I) {
|
||||||
|
Names.push_back(S->getOutputName(I));
|
||||||
|
|
||||||
// No need to transform the constraint literal.
|
// No need to transform the constraint literal.
|
||||||
Constraints.push_back(S->getOutputConstraintLiteral(I)->Retain());
|
Constraints.push_back(S->getOutputConstraintLiteral(I)->Retain());
|
||||||
|
|
||||||
|
@ -3375,6 +3379,8 @@ TreeTransform<Derived>::TransformAsmStmt(AsmStmt *S) {
|
||||||
|
|
||||||
// Go through the inputs.
|
// Go through the inputs.
|
||||||
for (unsigned I = 0, E = S->getNumInputs(); I != E; ++I) {
|
for (unsigned I = 0, E = S->getNumInputs(); I != E; ++I) {
|
||||||
|
Names.push_back(S->getInputName(I));
|
||||||
|
|
||||||
// No need to transform the constraint literal.
|
// No need to transform the constraint literal.
|
||||||
Constraints.push_back(S->getInputConstraintLiteral(I)->Retain());
|
Constraints.push_back(S->getInputConstraintLiteral(I)->Retain());
|
||||||
|
|
||||||
|
@ -3404,7 +3410,7 @@ TreeTransform<Derived>::TransformAsmStmt(AsmStmt *S) {
|
||||||
S->isVolatile(),
|
S->isVolatile(),
|
||||||
S->getNumOutputs(),
|
S->getNumOutputs(),
|
||||||
S->getNumInputs(),
|
S->getNumInputs(),
|
||||||
S->begin_output_names(),
|
Names.data(),
|
||||||
move_arg(Constraints),
|
move_arg(Constraints),
|
||||||
move_arg(Exprs),
|
move_arg(Exprs),
|
||||||
move(AsmString),
|
move(AsmString),
|
||||||
|
|
Loading…
Reference in New Issue