diff options
author | Kazu Hirata <kazu@google.com> | 2023-01-07 14:18:35 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2023-01-07 14:18:35 -0800 |
commit | 2fe8327406050d2585d2ced910a678e28caefcf5 (patch) | |
tree | da95c78fa33c17cf7829bbe6f5e0bfa62e0579ae /lldb/source/API/SBCommandInterpreter.cpp | |
parent | f190ce625ab0dc5a5e2b2515e6d26debb34843ab (diff) | |
download | llvm-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/API/SBCommandInterpreter.cpp')
-rw-r--r-- | lldb/source/API/SBCommandInterpreter.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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<std::string>(auto_repeat_command); + : std::optional<std::string>(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<std::string> GetRepeatCommand(Args ¤t_command_args, - uint32_t index) override { + std::optional<std::string> 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<lldb::SBCommandPluginInterface> m_backend; - llvm::Optional<std::string> m_auto_repeat_command; + std::optional<std::string> m_auto_repeat_command; }; SBCommandInterpreter::SBCommandInterpreter(CommandInterpreter *interpreter) |