[Lldb-commits] [lldb] 2b46625 - [lldb] Use Optional::transform instead of Optional::map (NFC)

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


Author: Kazu Hirata
Date: 2022-08-19T21:40:47-07:00
New Revision: 2b4662551603d59e1d425494cd13452c42e5c366

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

LOG: [lldb] Use Optional::transform instead of Optional::map (NFC)

Added: 
    

Modified: 
    lldb/source/Plugins/Process/Linux/IntelPTSingleBufferTrace.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/Process/Linux/IntelPTSingleBufferTrace.cpp b/lldb/source/Plugins/Process/Linux/IntelPTSingleBufferTrace.cpp
index 03cfb1e0a3eee..0ce901e7becb6 100644
--- a/lldb/source/Plugins/Process/Linux/IntelPTSingleBufferTrace.cpp
+++ b/lldb/source/Plugins/Process/Linux/IntelPTSingleBufferTrace.cpp
@@ -251,7 +251,7 @@ Expected<IntelPTSingleBufferTrace> IntelPTSingleBufferTrace::Start(
       (request.ipt_trace_size + page_size - 1) / page_size));
 
   Expected<perf_event_attr> attr = CreateIntelPTPerfEventConfiguration(
-      request.enable_tsc, request.psb_period.map([](int value) {
+      request.enable_tsc, request.psb_period.transform([](int value) {
         return static_cast<uint64_t>(value);
       }));
   if (!attr)


        


More information about the lldb-commits mailing list