]> granicus.if.org Git - llvm/commit
[CommandLine] Don't allow duplicate categories.
authorDon Hinton <hintonda@gmail.com>
Thu, 16 May 2019 16:25:13 +0000 (16:25 +0000)
committerDon Hinton <hintonda@gmail.com>
Thu, 16 May 2019 16:25:13 +0000 (16:25 +0000)
commitece7bca75d9288767abe7d9e78cc6eff70a90f6b
tree48bdbdd750cc537edf4f4c650f48dc19f8f7dbc2
parent98fef15a46e8df43c1cc5c615f82370c0bbb1e3f
[CommandLine] Don't allow duplicate categories.

Summary:
This is a fix to D61574, r360179, that allowed duplicate
OptionCategory's.  This change adds a check to make sure a category can
only be added once even if the user passes it twice.

Reviewed By: MaskRay

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D61972

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360913 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Support/CommandLine.cpp
unittests/Support/CommandLineTest.cpp