[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
This commit is contained in:
@@ -2426,7 +2426,7 @@ bool ScriptInterpreterPythonImpl::RunScriptFormatKeyword(
|
||||
|
||||
Locker py_lock(this,
|
||||
Locker::AcquireLock | Locker::InitSession | Locker::NoSTDIN);
|
||||
if (llvm::Optional<std::string> result = LLDBSWIGPythonRunScriptKeywordThread(
|
||||
if (std::optional<std::string> result = LLDBSWIGPythonRunScriptKeywordThread(
|
||||
impl_function, m_dictionary_name.c_str(),
|
||||
thread->shared_from_this())) {
|
||||
output = std::move(*result);
|
||||
@@ -2475,7 +2475,7 @@ bool ScriptInterpreterPythonImpl::RunScriptFormatKeyword(
|
||||
|
||||
Locker py_lock(this,
|
||||
Locker::AcquireLock | Locker::InitSession | Locker::NoSTDIN);
|
||||
if (llvm::Optional<std::string> result = LLDBSWIGPythonRunScriptKeywordFrame(
|
||||
if (std::optional<std::string> result = LLDBSWIGPythonRunScriptKeywordFrame(
|
||||
impl_function, m_dictionary_name.c_str(),
|
||||
frame->shared_from_this())) {
|
||||
output = std::move(*result);
|
||||
|
||||
Reference in New Issue
Block a user