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

via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 15 09:26:35 PST 2024


Author: Jacob Lambert
Date: 2024-02-15T09:26:31-08:00
New Revision: 537500995a1396a65c37d575216d81a33bd99656

URL: https://github.com/llvm/llvm-project/commit/537500995a1396a65c37d575216d81a33bd99656
DIFF: https://github.com/llvm/llvm-project/commit/537500995a1396a65c37d575216d81a33bd99656.diff

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

Added: 
    

Modified: 
    llvm/include/llvm/Support/CommandLine.h

Removed: 
    


################################################################################
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