[PATCH] D33128: [AsmParser] Mnemonic Spell Corrector

Simon Dardis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 19 07:01:22 PDT 2017


sdardis added a comment.

Sorry for missing this earlier, but the <Target>Operand class holds the mnemonic as a StringRef, and the matcher table ->getMnemonic() also returns a StringRef. Happily enough that class already has a edit_distance function: http://llvm.org/docs/doxygen/html/classllvm_1_1StringRef.html#a532f28c842d3728dc8f7e3c40949b33f

Thoughts on using that instead? It would avoid unnecessary std::string construction.

Thanks,
Simon


https://reviews.llvm.org/D33128





More information about the llvm-commits mailing list