summaryrefslogtreecommitdiff
path: root/lldb/source/Interpreter/OptionValueArray.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Interpreter/OptionValueArray.cpp')
-rw-r--r--lldb/source/Interpreter/OptionValueArray.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Interpreter/OptionValueArray.cpp b/lldb/source/Interpreter/OptionValueArray.cpp
index 40357d5f4b06..afd1f90aafe8 100644
--- a/lldb/source/Interpreter/OptionValueArray.cpp
+++ b/lldb/source/Interpreter/OptionValueArray.cpp
@@ -155,9 +155,9 @@ size_t OptionValueArray::GetArgs(Args &args) const {
args.Clear();
const uint32_t size = m_values.size();
for (uint32_t i = 0; i < size; ++i) {
- llvm::StringRef string_value = m_values[i]->GetStringValue();
- if (!string_value.empty())
- args.AppendArgument(string_value);
+ std::optional<llvm::StringRef> string_value = m_values[i]->GetStringValue();
+ if (string_value)
+ args.AppendArgument(*string_value);
}
return args.GetArgumentCount();