mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +01:00
[TableGen] Use ListSeparator (NFC)
This commit is contained in:
parent
454751eae1
commit
2ca15ec5a6
@ -1210,14 +1210,9 @@ bool FilterChooser::emitPredicateMatch(raw_ostream &o, unsigned &Indentation,
|
||||
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)
|
||||
@ -1230,8 +1225,6 @@ bool FilterChooser::emitPredicateMatch(raw_ostream &o, unsigned &Indentation,
|
||||
PrintFatalError(Pred->getLoc(), "Invalid AssemblerCondDag!");
|
||||
o << "Bits[" << Emitter->PredicateNamespace << "::" << Arg->getAsString()
|
||||
<< "]";
|
||||
|
||||
First = false;
|
||||
}
|
||||
|
||||
if (IsOr)
|
||||
|
@ -130,14 +130,9 @@ void SubtargetFeatureInfo::emitComputeAssemblerAvailableFeatures(
|
||||
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)
|
||||
@ -149,8 +144,6 @@ void SubtargetFeatureInfo::emitComputeAssemblerAvailableFeatures(
|
||||
!cast<DefInit>(Arg)->getDef()->isSubClassOf("SubtargetFeature"))
|
||||
PrintFatalError(SFI.TheDef->getLoc(), "Invalid AssemblerCondDag!");
|
||||
OS << "FB[" << TargetName << "::" << Arg->getAsString() << "]";
|
||||
|
||||
First = false;
|
||||
}
|
||||
|
||||
if (IsOr)
|
||||
|
Loading…
Reference in New Issue
Block a user