We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 117041d commit 8314b31Copy full SHA for 8314b31
llvm/include/llvm/Support/CommandLine.h
@@ -863,7 +863,10 @@ template <class DataType> class parser : public generic_parser_base {
863
///
864
template <class DT>
865
void addLiteralOption(StringRef Name, const DT &V, StringRef HelpStr) {
866
- assert(findOption(Name) == Values.size() && "Option already exists!");
+#ifndef NDEBUG
867
+ if (findOption(Name) != Values.size())
868
+ report_fatal_error("Option " + Name + " already exists!");
869
+#endif
870
OptionInfo X(Name, static_cast<DataType>(V), HelpStr);
871
Values.push_back(X);
872
AddLiteralOption(Owner, Name);
0 commit comments