[llvm] [llvm][Support] Add quotes around option name (PR #81784)

Jacob Lambert via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 14 12:36:52 PST 2024


https://github.com/lamb-j created https://github.com/llvm/llvm-project/pull/81784

None

>From 4b247e2f89441adc2d88ab9291af80315b6d4a84 Mon Sep 17 00:00:00 2001
From: Jacob Lambert <jacob.lambert at amd.com>
Date: Wed, 14 Feb 2024 12:35:37 -0800
Subject: [PATCH] [llvm][Support] Add quotes around option name

---
 llvm/include/llvm/Support/CommandLine.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/include/llvm/Support/CommandLine.h b/llvm/include/llvm/Support/CommandLine.h
index 8929f9b1db15c7..99dc9aefbd7d63 100644
--- a/llvm/include/llvm/Support/CommandLine.h
+++ b/llvm/include/llvm/Support/CommandLine.h
@@ -878,7 +878,7 @@ template <class DataType> class parser : public generic_parser_base {
   void addLiteralOption(StringRef Name, const DT &V, StringRef HelpStr) {
 #ifndef NDEBUG
     if (findOption(Name) != Values.size())
-      report_fatal_error("Option " + Name + " already exists!");
+      report_fatal_error("Option '" + Name + "' already exists!");
 #endif
     OptionInfo X(Name, static_cast<DataType>(V), HelpStr);
     Values.push_back(X);



More information about the llvm-commits mailing list