[Lldb-commits] [lldb] e6b5235 - [lldb] Replace None with std::nullopt in comments (NFC)
Kazu Hirata via lldb-commits
lldb-commits at lists.llvm.org
Sat May 6 08:56:37 PDT 2023
Author: Kazu Hirata
Date: 2023-05-06T08:56:24-07:00
New Revision: e6b52355a1f3eae9310003ee714c802ac8a63b46
URL: https://github.com/llvm/llvm-project/commit/e6b52355a1f3eae9310003ee714c802ac8a63b46
DIFF: https://github.com/llvm/llvm-project/commit/e6b52355a1f3eae9310003ee714c802ac8a63b46.diff
LOG: [lldb] Replace None with std::nullopt in comments (NFC)
This is part of an effort to migrate from llvm::Optional to
std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
Added:
Modified:
lldb/include/lldb/Target/Trace.h
lldb/source/Commands/CommandObjectThread.cpp
lldb/source/Plugins/Process/Linux/Perf.h
lldb/source/Plugins/TraceExporter/common/TraceHTR.h
Removed:
################################################################################
diff --git a/lldb/include/lldb/Target/Trace.h b/lldb/include/lldb/Target/Trace.h
index fc67a0e05ab44..987720e24e18d 100644
--- a/lldb/include/lldb/Target/Trace.h
+++ b/lldb/include/lldb/Target/Trace.h
@@ -570,7 +570,7 @@ class Trace : public PluginInterface,
llvm::DenseMap<ConstString, uint64_t> live_process_data;
/// \}
- /// The list of cpus being traced. Might be \b None depending on the
+ /// The list of cpus being traced. Might be \b std::nullopt depending on the
/// plug-in.
std::optional<std::vector<lldb::cpu_id_t>> cpus;
diff --git a/lldb/source/Commands/CommandObjectThread.cpp b/lldb/source/Commands/CommandObjectThread.cpp
index 052d52e2ddac9..851fc743f3895 100644
--- a/lldb/source/Commands/CommandObjectThread.cpp
+++ b/lldb/source/Commands/CommandObjectThread.cpp
@@ -2420,7 +2420,7 @@ class CommandObjectTraceDumpInstructions : public CommandObjectParsed {
}
CommandOptions m_options;
- // Last traversed id used to continue a repeat command. None means
+ // Last traversed id used to continue a repeat command. std::nullopt means
// that all the trace has been consumed.
std::optional<lldb::user_id_t> m_last_id;
};
diff --git a/lldb/source/Plugins/Process/Linux/Perf.h b/lldb/source/Plugins/Process/Linux/Perf.h
index 3f326212cdec6..658a5c3cd4686 100644
--- a/lldb/source/Plugins/Process/Linux/Perf.h
+++ b/lldb/source/Plugins/Process/Linux/Perf.h
@@ -122,8 +122,8 @@ class PerfEvent {
/// Configuration information for the event.
///
/// \param[in] pid
- /// The process or thread to be monitored by the event. If \b None, then
- /// all threads and processes are monitored.
+ /// The process or thread to be monitored by the event. If \b
+ /// std::nullopt, then all threads and processes are monitored.
static llvm::Expected<PerfEvent>
Init(perf_event_attr &attr, std::optional<lldb::pid_t> pid,
std::optional<lldb::cpu_id_t> core = std::nullopt);
diff --git a/lldb/source/Plugins/TraceExporter/common/TraceHTR.h b/lldb/source/Plugins/TraceExporter/common/TraceHTR.h
index 58a9262370a83..66aa19be1a469 100644
--- a/lldb/source/Plugins/TraceExporter/common/TraceHTR.h
+++ b/lldb/source/Plugins/TraceExporter/common/TraceHTR.h
@@ -215,7 +215,7 @@ class HTRInstructionLayer : public IHTRLayer {
///
/// \param[in] func_name
/// The name of the function the 'call' instruction is calling if it can
- /// be determined, None otherwise.
+ /// be determined, std::nullopt otherwise.
void AddCallInstructionMetadata(lldb::addr_t load_addr,
std::optional<ConstString> func_name);
More information about the lldb-commits
mailing list