mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-07 14:33:15 +00:00
Invert the meaning of printAliasInstr's return value. It now returns
true on success and false on failure. Update callers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129722 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6dda916358
commit
721ef66d17
@ -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…
x
Reference in New Issue
Block a user