[mips] Enable the mnemonic spell corrector
authorSimon Atanasyan <simon@atanasyan.com>
Thu, 13 Sep 2018 08:38:03 +0000 (08:38 +0000)
committerSimon Atanasyan <simon@atanasyan.com>
Thu, 13 Sep 2018 08:38:03 +0000 (08:38 +0000)
commitc49da2e4ed44c74473407353bc0bf72fb61c8664
treed512fa7d9604ea0c6ec700137cc1e40f2d3eed2f
parent7958735e45f5976582a4a5123f3953cb0ebe8c38
[mips] Enable the mnemonic spell corrector

This implements suggesting alternative mnemonics when an invalid one is
specified. For example `addru $9, $6, 17767` leads to the following
error message:

error: unknown instruction, did you mean: add, addiu, addu, maddu?

Differential revision: https://reviews.llvm.org/D40646

llvm-svn: 342119
llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
llvm/test/MC/Mips/invalid-instructions-spellcheck.s [new file with mode: 0644]