[llvm] [llvm][support] Show name of overlapping cl option (PR #70108)
Maksim Levental via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 24 12:48:40 PDT 2023
https://github.com/makslevental updated https://github.com/llvm/llvm-project/pull/70108
>From bace95e51339d931d17989189d4a3ce947bf17bb Mon Sep 17 00:00:00 2001
From: max <maksim.levental at gmail.com>
Date: Tue, 24 Oct 2023 14:48:16 -0500
Subject: [PATCH] [llvm][support] show name of overlapping cl opt
---
llvm/include/llvm/Support/CommandLine.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/llvm/include/llvm/Support/CommandLine.h b/llvm/include/llvm/Support/CommandLine.h
index 49f4a668ae416fe..ef323363ae5376f 100644
--- a/llvm/include/llvm/Support/CommandLine.h
+++ b/llvm/include/llvm/Support/CommandLine.h
@@ -863,7 +863,8 @@ template <class DataType> class parser : public generic_parser_base {
///
template <class DT>
void addLiteralOption(StringRef Name, const DT &V, StringRef HelpStr) {
- assert(findOption(Name) == Values.size() && "Option already exists!");
+ assert(findOption(Name) == Values.size() &&
+ Twine("Option " + Name + " already exists!"));
OptionInfo X(Name, static_cast<DataType>(V), HelpStr);
Values.push_back(X);
AddLiteralOption(Owner, Name);
More information about the llvm-commits
mailing list