Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Rot127 committed Jan 19, 2024
1 parent 0f87770 commit 38cec1f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions llvm/utils/TableGen/PrinterCapstone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1780,11 +1780,11 @@ void PrinterCapstone::asmWriterEmitPrintAliasOp(
std::string const &TargetName, StringRef const &ClassName,
std::vector<std::pair<std::string, bool>> const &PrintMethods,
bool PassSubtarget) const {
OS << "#ifndef CAPSTONE_DIET\n";
OS << "static void printCustomAliasOperand(\n"
<< " MCInst *MI, uint64_t Address, unsigned OpIdx,\n"
<< " unsigned PrintMethodIdx,\n"
<< " SStream *OS) {\n"
<< "#ifndef CAPSTONE_DIET\n";
<< " SStream *OS) {\n";
if (PrintMethods.empty())
OS << " llvm_unreachable(\"Unknown PrintMethod kind\");\n";
else {
Expand All @@ -1804,14 +1804,15 @@ void PrinterCapstone::asmWriterEmitPrintAliasOp(
}
OS << " }\n";
}
OS << "#endif // CAPSTONE_DIET\n";
OS << "}\n\n";
OS << "}\n";
OS << "#endif // CAPSTONE_DIET\n\n";
}

void PrinterCapstone::asmWriterEmitPrintMC(
std::string const &TargetName, StringRef const &ClassName,
std::vector<const Record *> const &MCOpPredicates) const {
if (!MCOpPredicates.empty()) {
OS << "#ifndef CAPSTONE_DIET\n";
OS << "static bool " << TargetName << ClassName
<< "ValidateMCOperand(const MCOperand *MCOp,\n"
<< " unsigned PredicateIndex) {\n"
Expand All @@ -1830,7 +1831,8 @@ void PrinterCapstone::asmWriterEmitPrintMC(
<< " }\n";
}
OS << " }\n"
<< "}\n\n";
<< "}\n";
OS << "#endif // CAPSTONE_DIET\n\n";
}
}

Expand Down

0 comments on commit 38cec1f

Please sign in to comment.