[llvm] Add diagnostic help for inline asm operand constraint 'H' (PR #88248)
Jessica Clarke via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 10 10:49:28 PDT 2024
================
@@ -692,13 +692,32 @@ static bool printAsmVRegister(const MachineOperand &MO, char Mode,
return false;
}
+void X86AsmPrinter::diagnoseAsmOperandError(LLVMContext &C,
+ const AsmOperandErrorCode EC,
+ const char *AsmStr, uint64_t Loc) {
+ AsmPrinter::diagnoseAsmOperandError(C, EC, AsmStr, Loc);
+ std::string msg;
+ raw_string_ostream Msg(msg);
+ switch (EC) {
+ default:
+ break;
+ case AsmOperandErrorCode::CONSTRAINT_H_ERROR:
----------------
jrtc27 wrote:
But H doesn't return this error on X86, so this is dead code. Which you would know if you wrote a test for this code (something else that's lacking from this PR).
https://github.com/llvm/llvm-project/pull/88248
More information about the llvm-commits
mailing list