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

via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 14 12:37:18 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-support

Author: Jacob Lambert (lamb-j)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/81784.diff


1 Files Affected:

- (modified) llvm/include/llvm/Support/CommandLine.h (+1-1) 


``````````diff
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);

``````````

</details>


https://github.com/llvm/llvm-project/pull/81784


More information about the llvm-commits mailing list