From 2fe8327406050d2585d2ced910a678e28caefcf5 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 7 Jan 2023 14:18:35 -0800 Subject: [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 --- lldb/source/API/SBCommandInterpreter.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lldb/source/API/SBCommandInterpreter.cpp') diff --git a/lldb/source/API/SBCommandInterpreter.cpp b/lldb/source/API/SBCommandInterpreter.cpp index 5a48dc8..cd6ef3b 100644 --- a/lldb/source/API/SBCommandInterpreter.cpp +++ b/lldb/source/API/SBCommandInterpreter.cpp @@ -47,7 +47,7 @@ public: m_auto_repeat_command = auto_repeat_command == nullptr ? std::nullopt - : llvm::Optional(auto_repeat_command); + : std::optional(auto_repeat_command); // We don't know whether any given command coming from this interface takes // arguments or not so here we're just disabling the basic args check. CommandArgumentData none_arg{eArgTypeNone, eArgRepeatStar}; @@ -60,8 +60,8 @@ public: /// but in short, if std::nullopt is returned, the previous command will be /// repeated, and if an empty string is returned, no commands will be /// executed. - llvm::Optional GetRepeatCommand(Args ¤t_command_args, - uint32_t index) override { + std::optional GetRepeatCommand(Args ¤t_command_args, + uint32_t index) override { if (!m_auto_repeat_command) return std::nullopt; else @@ -78,7 +78,7 @@ protected: return ret; } std::shared_ptr m_backend; - llvm::Optional m_auto_repeat_command; + std::optional m_auto_repeat_command; }; SBCommandInterpreter::SBCommandInterpreter(CommandInterpreter *interpreter) -- cgit v1.1