forked from OSchip/llvm-project
Invert the meaning of printAliasInstr's return value. It now returns
true on success and false on failure. Update callers. llvm-svn: 129722
This commit is contained in:
parent
ed904c82b1
commit
2e3fbaab39
|
@ -42,7 +42,8 @@ X86ATTInstPrinter::X86ATTInstPrinter(TargetMachine &TM, const MCAsmInfo &MAI)
|
|||
}
|
||||
|
||||
void X86ATTInstPrinter::printInst(const MCInst *MI, raw_ostream &OS) {
|
||||
if (printAliasInstr(MI, OS))
|
||||
// Try to print any aliases first.
|
||||
if (!printAliasInstr(MI, OS))
|
||||
printInstruction(MI, OS);
|
||||
|
||||
// If verbose assembly is enabled, we can print some informative comments.
|
||||
|
|
|
@ -31,6 +31,8 @@ public:
|
|||
|
||||
// Methods used to print the alias of an instruction.
|
||||
unsigned ComputeAvailableFeatures(const X86Subtarget *Subtarget) const;
|
||||
// Autogenerated by tblgen, returns true if we successfully printed an
|
||||
// alias.
|
||||
bool printAliasInstr(const MCInst *MI, raw_ostream &OS);
|
||||
|
||||
// Autogenerated by tblgen.
|
||||
|
|
|
@ -975,11 +975,11 @@ void AsmWriterEmitter::EmitPrintAliasInstruction(raw_ostream &O) {
|
|||
CasesO << '\n';
|
||||
}
|
||||
|
||||
CasesO.indent(4) << "return true;\n";
|
||||
CasesO.indent(4) << "return false;\n";
|
||||
}
|
||||
|
||||
if (CasesO.str().empty() || !isMC) {
|
||||
O << " return true;\n";
|
||||
O << " return false;\n";
|
||||
O << "}\n\n";
|
||||
O << "#endif // PRINT_ALIAS_INSTR\n";
|
||||
return;
|
||||
|
@ -990,7 +990,7 @@ void AsmWriterEmitter::EmitPrintAliasInstruction(raw_ostream &O) {
|
|||
if (NeedAvailableFeatures)
|
||||
O.indent(2) << "unsigned AvailableFeatures = getAvailableFeatures();\n\n";
|
||||
O.indent(2) << "switch (MI->getOpcode()) {\n";
|
||||
O.indent(2) << "default: return true;\n";
|
||||
O.indent(2) << "default: return false;\n";
|
||||
O << CasesO.str();
|
||||
O.indent(2) << "}\n\n";
|
||||
|
||||
|
@ -1019,7 +1019,7 @@ void AsmWriterEmitter::EmitPrintAliasInstruction(raw_ostream &O) {
|
|||
O << " }\n";
|
||||
O << " }\n\n";
|
||||
|
||||
O << " return false;\n";
|
||||
O << " return true;\n";
|
||||
O << "}\n\n";
|
||||
|
||||
O << "#endif // PRINT_ALIAS_INSTR\n";
|
||||
|
|
Loading…
Reference in New Issue