aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Interpreter/CommandInterpreter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Interpreter/CommandInterpreter.cpp')
-rw-r--r--lldb/source/Interpreter/CommandInterpreter.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index ba61884..7e08653 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -146,14 +146,14 @@ CommandInterpreter::CommandInterpreter(Debugger &debugger,
bool CommandInterpreter::GetExpandRegexAliases() const {
const uint32_t idx = ePropertyExpandRegexAliases;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(
- nullptr, idx, g_interpreter_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
+ .value_or(g_interpreter_properties[idx].default_uint_value != 0);
}
bool CommandInterpreter::GetPromptOnQuit() const {
const uint32_t idx = ePropertyPromptOnQuit;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(
- nullptr, idx, g_interpreter_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
+ .value_or(g_interpreter_properties[idx].default_uint_value != 0);
}
void CommandInterpreter::SetPromptOnQuit(bool enable) {
@@ -163,8 +163,8 @@ void CommandInterpreter::SetPromptOnQuit(bool enable) {
bool CommandInterpreter::GetSaveSessionOnQuit() const {
const uint32_t idx = ePropertySaveSessionOnQuit;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(
- nullptr, idx, g_interpreter_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
+ .value_or(g_interpreter_properties[idx].default_uint_value != 0);
}
void CommandInterpreter::SetSaveSessionOnQuit(bool enable) {
@@ -174,8 +174,8 @@ void CommandInterpreter::SetSaveSessionOnQuit(bool enable) {
bool CommandInterpreter::GetOpenTranscriptInEditor() const {
const uint32_t idx = ePropertyOpenTranscriptInEditor;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(
- nullptr, idx, g_interpreter_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
+ .value_or(g_interpreter_properties[idx].default_uint_value != 0);
}
void CommandInterpreter::SetOpenTranscriptInEditor(bool enable) {
@@ -195,8 +195,8 @@ void CommandInterpreter::SetSaveSessionDirectory(llvm::StringRef path) {
bool CommandInterpreter::GetEchoCommands() const {
const uint32_t idx = ePropertyEchoCommands;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(
- nullptr, idx, g_interpreter_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
+ .value_or(g_interpreter_properties[idx].default_uint_value != 0);
}
void CommandInterpreter::SetEchoCommands(bool enable) {
@@ -206,8 +206,8 @@ void CommandInterpreter::SetEchoCommands(bool enable) {
bool CommandInterpreter::GetEchoCommentCommands() const {
const uint32_t idx = ePropertyEchoCommentCommands;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(
- nullptr, idx, g_interpreter_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
+ .value_or(g_interpreter_properties[idx].default_uint_value != 0);
}
void CommandInterpreter::SetEchoCommentCommands(bool enable) {
@@ -246,26 +246,26 @@ void CommandInterpreter::ResolveCommand(const char *command_line,
bool CommandInterpreter::GetStopCmdSourceOnError() const {
const uint32_t idx = ePropertyStopCmdSourceOnError;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(
- nullptr, idx, g_interpreter_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
+ .value_or(g_interpreter_properties[idx].default_uint_value != 0);
}
bool CommandInterpreter::GetSpaceReplPrompts() const {
const uint32_t idx = ePropertySpaceReplPrompts;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(
- nullptr, idx, g_interpreter_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
+ .value_or(g_interpreter_properties[idx].default_uint_value != 0);
}
bool CommandInterpreter::GetRepeatPreviousCommand() const {
const uint32_t idx = ePropertyRepeatPreviousCommand;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(
- nullptr, idx, g_interpreter_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
+ .value_or(g_interpreter_properties[idx].default_uint_value != 0);
}
bool CommandInterpreter::GetRequireCommandOverwrite() const {
const uint32_t idx = ePropertyRequireCommandOverwrite;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(
- nullptr, idx, g_interpreter_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
+ .value_or(g_interpreter_properties[idx].default_uint_value != 0);
}
void CommandInterpreter::Initialize() {