if (IsOr)
o << "(";
- bool First = true;
+ ListSeparator LS(IsOr ? " || " : " && ");
for (auto *Arg : D->getArgs()) {
- if (!First) {
- if (IsOr)
- o << " || ";
- else
- o << " && ";
- }
+ o << LS;
if (auto *NotArg = dyn_cast<DagInit>(Arg)) {
if (NotArg->getOperator()->getAsString() != "not" ||
NotArg->getNumArgs() != 1)
PrintFatalError(Pred->getLoc(), "Invalid AssemblerCondDag!");
o << "Bits[" << Emitter->PredicateNamespace << "::" << Arg->getAsString()
<< "]";
-
- First = false;
}
if (IsOr)
if (IsOr)
OS << "(";
- bool First = true;
+ ListSeparator LS(IsOr ? " || " : " && ");
for (auto *Arg : D->getArgs()) {
- if (!First) {
- if (IsOr)
- OS << " || ";
- else
- OS << " && ";
- }
+ OS << LS;
if (auto *NotArg = dyn_cast<DagInit>(Arg)) {
if (NotArg->getOperator()->getAsString() != "not" ||
NotArg->getNumArgs() != 1)
!cast<DefInit>(Arg)->getDef()->isSubClassOf("SubtargetFeature"))
PrintFatalError(SFI.TheDef->getLoc(), "Invalid AssemblerCondDag!");
OS << "FB[" << TargetName << "::" << Arg->getAsString() << "]";
-
- First = false;
}
if (IsOr)