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).
Differential Revision: https://reviews.llvm.org/D154387
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();
}