[Lldb-commits] [lldb] c903136 - [lldb] Use Optional::has_value instead of Optional::hasValue (NFC)

Kazu Hirata via lldb-commits lldb-commits at lists.llvm.org
Sat Nov 19 23:22:55 PST 2022


Author: Kazu Hirata
Date: 2022-11-19T23:22:48-08:00
New Revision: c903136f195b65f175797eaf856213b1a6826fa2

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

LOG: [lldb] Use Optional::has_value instead of Optional::hasValue (NFC)

Added: 
    

Modified: 
    lldb/source/Plugins/Trace/intel-pt/ThreadDecoder.cpp
    lldb/source/Plugins/Trace/intel-pt/TraceIntelPTBundleLoader.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/Trace/intel-pt/ThreadDecoder.cpp b/lldb/source/Plugins/Trace/intel-pt/ThreadDecoder.cpp
index 21b1aacfccc62..0a819916fc75b 100644
--- a/lldb/source/Plugins/Trace/intel-pt/ThreadDecoder.cpp
+++ b/lldb/source/Plugins/Trace/intel-pt/ThreadDecoder.cpp
@@ -36,7 +36,7 @@ Expected<Optional<uint64_t>> ThreadDecoder::FindLowestTSC() {
 }
 
 Expected<DecodedThreadSP> ThreadDecoder::Decode() {
-  if (!m_decoded_thread.hasValue()) {
+  if (!m_decoded_thread.has_value()) {
     if (Expected<DecodedThreadSP> decoded_thread = DoDecode()) {
       m_decoded_thread = *decoded_thread;
     } else {

diff  --git a/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTBundleLoader.cpp b/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTBundleLoader.cpp
index 0e664fd91d80f..c30d6adf3e0f5 100644
--- a/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTBundleLoader.cpp
+++ b/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTBundleLoader.cpp
@@ -34,14 +34,14 @@ Error TraceIntelPTBundleLoader::ParseModule(Target &target,
   auto do_parse = [&]() -> Error {
     FileSpec system_file_spec(module.system_path);
 
-    FileSpec local_file_spec(module.file.hasValue() ? *module.file
-                                                    : module.system_path);
+    FileSpec local_file_spec(module.file.has_value() ? *module.file
+                                                     : module.system_path);
 
     ModuleSpec module_spec;
     module_spec.GetFileSpec() = local_file_spec;
     module_spec.GetPlatformFileSpec() = system_file_spec;
 
-    if (module.uuid.hasValue())
+    if (module.uuid.has_value())
       module_spec.GetUUID().SetFromStringRef(*module.uuid);
 
     Status error;


        


More information about the lldb-commits mailing list