[lldb] Use Optional::value instead of Optional::getValue (NFC)
authorKazu Hirata <kazu@google.com>
Sat, 20 Aug 2022 04:40:48 +0000 (21:40 -0700)
committerKazu Hirata <kazu@google.com>
Sat, 20 Aug 2022 04:40:48 +0000 (21:40 -0700)
lldb/source/Host/common/Editline.cpp
lldb/tools/lldb-test/lldb-test.cpp

index cee7a36..c46e69d 100644 (file)
@@ -1086,7 +1086,7 @@ unsigned char Editline::TypedCharacter(int ch) {
       m_color_prompts ? m_suggestion_ansi_suffix.c_str() : "";
 
   if (llvm::Optional<std::string> to_add = m_suggestion_callback(line)) {
-    std::string to_add_color = ansi_prefix + to_add.getValue() + ansi_suffix;
+    std::string to_add_color = ansi_prefix + to_add.value() + ansi_suffix;
     fputs(typed.c_str(), m_output_file);
     fputs(to_add_color.c_str(), m_output_file);
     size_t new_autosuggestion_size = line.size() + to_add->length();
index 466e082..b365131 100644 (file)
@@ -884,7 +884,7 @@ static Mangled::NamePreference opts::symtab::getNamePreference() {
 
 int opts::symtab::handleSymtabCommand(Debugger &Dbg) {
   if (auto error = validate()) {
-    logAllUnhandledErrors(std::move(error.getValue()), WithColor::error(), "");
+    logAllUnhandledErrors(std::move(error.value()), WithColor::error(), "");
     return 1;
   }