[PATCH] D33128: [AsmParser] Mnemonic Spell Corrector
Sjoerd Meijer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 16 03:36:25 PDT 2017
SjoerdMeijer updated this revision to Diff 102801.
SjoerdMeijer added a comment.
Herald added a subscriber: kristof.beyls.
I am now reusing the already existing tablegen'ed MnemonicTable; so no need to introduce another one. That's the reason I've moved the algorithm to the tablegen'ed files, because that's where definitions/datastructures live.
Algorithmically I have made a few tweaks:
- it now returns a list of candidates/suggestions (rather than arbitrarily just the first one)
- to avoid giving useless suggestions, I have restricted to only consider candidates that are 2 edits away.
The added regression test should give a good impression what to expect from this patch and the given suggestions.
https://reviews.llvm.org/D33128
Files:
lib/Target/ARM/AsmParser/ARMAsmParser.cpp
test/MC/ARM/invalid-instructions.s
utils/TableGen/AsmMatcherEmitter.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33128.102801.patch
Type: text/x-patch
Size: 5967 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170616/ad9f990a/attachment.bin>
More information about the llvm-commits
mailing list