bulbazord created this revision.
bulbazord added reviewers: JDevlieghere, mib.
Herald added a project: All.
bulbazord requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

This does 2 things:

- Corrects a minor typo (`value subvalue` -> `valid subvalue`)
- Removes an unnecessary instance of `str().c_str()` (creating a temporary 
std::string from a StringRef just to get a valid null-terminated string).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D154387

Files:
  lldb/include/lldb/Interpreter/OptionValue.h


Index: lldb/include/lldb/Interpreter/OptionValue.h
===================================================================
--- lldb/include/lldb/Interpreter/OptionValue.h
+++ lldb/include/lldb/Interpreter/OptionValue.h
@@ -114,8 +114,7 @@
   virtual lldb::OptionValueSP GetSubValue(const ExecutionContext *exe_ctx,
                                           llvm::StringRef name,
                                           Status &error) const {
-    error.SetErrorStringWithFormat("'%s' is not a value subvalue",
-                                   name.str().c_str());
+    error.SetErrorStringWithFormatv("'{0}' is not a valid subvalue", name);
     return lldb::OptionValueSP();
   }
 


Index: lldb/include/lldb/Interpreter/OptionValue.h
===================================================================
--- lldb/include/lldb/Interpreter/OptionValue.h
+++ lldb/include/lldb/Interpreter/OptionValue.h
@@ -114,8 +114,7 @@
   virtual lldb::OptionValueSP GetSubValue(const ExecutionContext *exe_ctx,
                                           llvm::StringRef name,
                                           Status &error) const {
-    error.SetErrorStringWithFormat("'%s' is not a value subvalue",
-                                   name.str().c_str());
+    error.SetErrorStringWithFormatv("'{0}' is not a valid subvalue", name);
     return lldb::OptionValueSP();
   }
 
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
  • [Lldb-commits] [PATCH] D154... Alex Langford via Phabricator via lldb-commits

Reply via email to