- changed switch statement so that adding new item to VariantKind would cause compilation warning if the respective case is not added.
- updated RISCVMCExpr::getVariantKindForName as well.
I do not know how to test this. But I changed the patch so that if a new item would be added to VariantKind and that item would not be handled in the switch statement, compilation would give a warning.
I got crash when executed llc -debug -filetype=obj. I am not sure if it can be found in MIR, but this looks unlikely, as it is an MC layer feature.
Looking again. The only caller of this is RISCVAsmParser::parseOperandWithModifier. Are we allowing something additional in assembly parsing with this change? Is that something we should test?