[Lldb-commits] [lldb] c38bc42 - [lldb] Use Optional::value instead of Optional::getValue (NFC)

Kazu Hirata via lldb-commits lldb-commits at lists.llvm.org
Fri Aug 19 21:41:08 PDT 2022


Author: Kazu Hirata
Date: 2022-08-19T21:40:48-07:00
New Revision: c38bc421b1268ca371cdbb54e470d758968ce67a

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

LOG: [lldb] Use Optional::value instead of Optional::getValue (NFC)

Added: 
    

Modified: 
    lldb/source/Host/common/Editline.cpp
    lldb/tools/lldb-test/lldb-test.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Host/common/Editline.cpp b/lldb/source/Host/common/Editline.cpp
index cee7a3655046a..c46e69d9be7ff 100644
--- a/lldb/source/Host/common/Editline.cpp
+++ b/lldb/source/Host/common/Editline.cpp
@@ -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();

diff  --git a/lldb/tools/lldb-test/lldb-test.cpp b/lldb/tools/lldb-test/lldb-test.cpp
index 466e082534e58..b3651314b7f22 100644
--- a/lldb/tools/lldb-test/lldb-test.cpp
+++ b/lldb/tools/lldb-test/lldb-test.cpp
@@ -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;
   }
 


        


More information about the lldb-commits mailing list