Option parsing: support case-insensitive option matching.
authorRui Ueyama <ruiu@google.com>
Tue, 27 Aug 2013 23:47:01 +0000 (23:47 +0000)
committerRui Ueyama <ruiu@google.com>
Tue, 27 Aug 2013 23:47:01 +0000 (23:47 +0000)
commit055f4e99ffb32462db6fc62f9a306f2865acacb0
treea3981efdb6d873eebe2916e5eeb789fb0c344f54
parent587e1939fa1bd2bcce764c6dc53263f9faa44ab9
Option parsing: support case-insensitive option matching.

Link.exe's command line options are case-insensitive. This patch
adds a new attribute to OptTable to let the option parser to compare
options, ignoring case.

Command lines are generally case-insensitive on Windows. CL.exe is an
exception. So this new attribute should be useful for other commands
running on Windows.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189416 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Option/OptTable.h
lib/Option/OptTable.cpp
unittests/Option/OptionParsingTest.cpp
utils/TableGen/OptParserEmitter.cpp