Author: Kazu Hirata Date: 2022-12-05T22:43:53-08:00 New Revision: 1d0ba311d88d02caa6b5e1607047fdb6c909b705
URL: https://github.com/llvm/llvm-project/commit/1d0ba311d88d02caa6b5e1607047fdb6c909b705 DIFF: https://github.com/llvm/llvm-project/commit/1d0ba311d88d02caa6b5e1607047fdb6c909b705.diff LOG: [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 Added: Modified: lldb/bindings/python/python-wrapper.swig Removed: ################################################################################ diff --git a/lldb/bindings/python/python-wrapper.swig b/lldb/bindings/python/python-wrapper.swig index adac8a405ab9c..7342d9d7e82f8 100644 --- a/lldb/bindings/python/python-wrapper.swig +++ b/lldb/bindings/python/python-wrapper.swig @@ -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); _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits