[PATCH] Option parsing: support case-insensitive option matching.

Rui Ueyama ruiu at google.com
Mon Aug 26 10:44:22 PDT 2013


  So I tried to make case-insensitivity a table option but it turned out
  that that is not a very good design. It looked odd as there's no other
  flags that is global to a table and I didn't feel it was a correct way.

  This is a modified patch. With this patch, all options are ordered in a
  case-insensitive manner in the tablegen-generated file, and the binary
  search in OptTable.cpp is done in a case-insensitive manner too.

  This may slightly decrease the performance of the option matching, but
  I think it is negligible because it's not in a hot path or anything.

Hi hans,

http://llvm-reviews.chandlerc.com/D1485

CHANGE SINCE LAST DIFF
  http://llvm-reviews.chandlerc.com/D1485?vs=3699&id=3756#toc

Files:
  include/llvm/Option/OptParser.td
  include/llvm/Option/OptTable.h
  lib/Option/OptTable.cpp
  unittests/Option/OptionParsingTest.cpp
  unittests/Option/Opts.td
  utils/TableGen/OptParserEmitter.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1485.3.patch
Type: text/x-patch
Size: 8658 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130826/d78e4358/attachment.bin>


More information about the llvm-commits mailing list