summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2013-08-27 23:47:01 +0000
committerRui Ueyama <ruiu@google.com>2013-08-27 23:47:01 +0000
commit055f4e99ffb32462db6fc62f9a306f2865acacb0 (patch)
treea3981efdb6d873eebe2916e5eeb789fb0c344f54 /include
parent587e1939fa1bd2bcce764c6dc53263f9faa44ab9 (diff)
downloadllvm-055f4e99ffb32462db6fc62f9a306f2865acacb0.tar.gz
llvm-055f4e99ffb32462db6fc62f9a306f2865acacb0.tar.bz2
llvm-055f4e99ffb32462db6fc62f9a306f2865acacb0.tar.xz
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
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Option/OptTable.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/llvm/Option/OptTable.h b/include/llvm/Option/OptTable.h
index a5b59cea3f..5035940af0 100644
--- a/include/llvm/Option/OptTable.h
+++ b/include/llvm/Option/OptTable.h
@@ -51,6 +51,7 @@ private:
/// \brief The static option information table.
const Info *OptionInfos;
unsigned NumOptionInfos;
+ bool IgnoreCase;
unsigned TheInputOptionID;
unsigned TheUnknownOptionID;
@@ -72,7 +73,8 @@ private:
}
protected:
- OptTable(const Info *_OptionInfos, unsigned _NumOptionInfos);
+ OptTable(const Info *_OptionInfos, unsigned _NumOptionInfos,
+ bool _IgnoreCase = false);
public:
~OptTable();