llvm.org GIT mirror llvm / 721ef66
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 Eric Christopher 9 years ago
3 changed file(s) with 8 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
4141 }
4242
4343 void X86ATTInstPrinter::printInst(const MCInst *MI, raw_ostream &OS) {
44 if (printAliasInstr(MI, OS))
44 // Try to print any aliases first.
45 if (!printAliasInstr(MI, OS))
4546 printInstruction(MI, OS);
4647
4748 // If verbose assembly is enabled, we can print some informative comments.
3030
3131 // Methods used to print the alias of an instruction.
3232 unsigned ComputeAvailableFeatures(const X86Subtarget *Subtarget) const;
33 // Autogenerated by tblgen, returns true if we successfully printed an
34 // alias.
3335 bool printAliasInstr(const MCInst *MI, raw_ostream &OS);
3436
3537 // Autogenerated by tblgen.
974974 CasesO << '\n';
975975 }
976976
977 CasesO.indent(4) << "return true;\n";
977 CasesO.indent(4) << "return false;\n";
978978 }
979979
980980 if (CasesO.str().empty() || !isMC) {
981 O << " return true;\n";
981 O << " return false;\n";
982982 O << "}\n\n";
983983 O << "#endif // PRINT_ALIAS_INSTR\n";
984984 return;
989989 if (NeedAvailableFeatures)
990990 O.indent(2) << "unsigned AvailableFeatures = getAvailableFeatures();\n\n";
991991 O.indent(2) << "switch (MI->getOpcode()) {\n";
992 O.indent(2) << "default: return true;\n";
992 O.indent(2) << "default: return false;\n";
993993 O << CasesO.str();
994994 O.indent(2) << "}\n\n";
995995
10181018 O << " }\n";
10191019 O << " }\n\n";
10201020
1021 O << " return false;\n";
1021 O << " return true;\n";
10221022 O << "}\n\n";
10231023
10241024 O << "#endif // PRINT_ALIAS_INSTR\n";