aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2023-01-07 14:18:35 -0800
committerKazu Hirata <kazu@google.com>2023-01-07 14:18:35 -0800
commit2fe8327406050d2585d2ced910a678e28caefcf5 (patch)
treeda95c78fa33c17cf7829bbe6f5e0bfa62e0579ae /lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp
parentf190ce625ab0dc5a5e2b2515e6d26debb34843ab (diff)
downloadllvm-2fe8327406050d2585d2ced910a678e28caefcf5.zip
llvm-2fe8327406050d2585d2ced910a678e28caefcf5.tar.gz
llvm-2fe8327406050d2585d2ced910a678e28caefcf5.tar.bz2
[lldb] Use std::optional instead of llvm::Optional (NFC)
This patch replaces (llvm::|)Optional< with std::optional<. I'll post a separate patch to clean up the "using" declarations, #include "llvm/ADT/Optional.h", etc. 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
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp')
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp
index 311da2b..5fd085d 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp
@@ -76,10 +76,10 @@ Status ScriptedProcessPythonInterface::Stop() {
return GetStatusFromMethod("stop");
}
-llvm::Optional<MemoryRegionInfo>
+std::optional<MemoryRegionInfo>
ScriptedProcessPythonInterface::GetMemoryRegionContainingAddress(
lldb::addr_t address, Status &error) {
- auto mem_region = Dispatch<llvm::Optional<MemoryRegionInfo>>(
+ auto mem_region = Dispatch<std::optional<MemoryRegionInfo>>(
"get_memory_region_containing_address", error, address);
if (error.Fail()) {
@@ -170,7 +170,7 @@ bool ScriptedProcessPythonInterface::IsAlive() {
return obj->GetBooleanValue();
}
-llvm::Optional<std::string>
+std::optional<std::string>
ScriptedProcessPythonInterface::GetScriptedThreadPluginName() {
Status error;
StructuredData::ObjectSP obj = Dispatch("get_scripted_thread_plugin", error);