mirror of
https://github.com/intel/llvm.git
synced 2026-01-13 11:02:04 +08:00
[lldb] Use std::nullopt instead of llvm::None (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
This commit is contained in:
@@ -946,7 +946,7 @@ llvm::Optional<std::string> lldb_private::LLDBSWIGPythonRunScriptKeywordThread(
|
||||
lldb::ThreadSP thread) {
|
||||
if (python_function_name == NULL || python_function_name[0] == '\0' ||
|
||||
!session_dictionary_name)
|
||||
return llvm::None;
|
||||
return std::nullopt;
|
||||
|
||||
PyErr_Cleaner py_err_cleaner(true);
|
||||
|
||||
@@ -956,7 +956,7 @@ llvm::Optional<std::string> lldb_private::LLDBSWIGPythonRunScriptKeywordThread(
|
||||
python_function_name, dict);
|
||||
|
||||
if (!pfunc.IsAllocated())
|
||||
return llvm::None;
|
||||
return std::nullopt;
|
||||
|
||||
auto result = pfunc(ToSWIGWrapper(std::move(thread)), dict);
|
||||
|
||||
@@ -993,7 +993,7 @@ llvm::Optional<std::string> lldb_private::LLDBSWIGPythonRunScriptKeywordFrame(
|
||||
lldb::StackFrameSP frame) {
|
||||
if (python_function_name == NULL || python_function_name[0] == '\0' ||
|
||||
!session_dictionary_name)
|
||||
return llvm::None;
|
||||
return std::nullopt;
|
||||
|
||||
PyErr_Cleaner py_err_cleaner(true);
|
||||
|
||||
@@ -1003,7 +1003,7 @@ llvm::Optional<std::string> lldb_private::LLDBSWIGPythonRunScriptKeywordFrame(
|
||||
python_function_name, dict);
|
||||
|
||||
if (!pfunc.IsAllocated())
|
||||
return llvm::None;
|
||||
return std::nullopt;
|
||||
|
||||
auto result = pfunc(ToSWIGWrapper(std::move(frame)), dict);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user