[llvm] [NFC][MC][CodeEmitterGen] Extract error reporting into a helper function (PR #159778)
Rahul Joshi via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 19 11:15:06 PDT 2025
================
@@ -522,11 +515,7 @@ void CodeEmitterGen::run(raw_ostream &O) {
<< " switch (MI.getOpcode()) {\n";
emitCaseMap(O, BitOffsetCaseMap);
O << " }\n"
- << " std::string msg;\n"
- << " raw_string_ostream Msg(msg);\n"
- << " Msg << \"Not supported instr[opcode]: \" << MI << \"[\" << OpNum "
- "<< \"]\";\n"
- << " report_fatal_error(Msg.str().c_str());\n"
+ << " reportUnsupportedOperand(MI, OpNum);\n"
----------------
jurahul wrote:
Done
https://github.com/llvm/llvm-project/pull/159778
More information about the llvm-commits
mailing list