aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectMemory.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2023-05-14 19:58:16 -0700
committerJonas Devlieghere <jonas@devlieghere.com>2023-05-14 20:18:47 -0700
commit3ebb33632a1509450fdbc1fb6a21107a0a513072 (patch)
treeb71ac7a9114332ab18e5e5f9f0d78dbcef5fc4a4 /lldb/source/Commands/CommandObjectMemory.cpp
parent245549c57517de3b8fa478512bb1ae4295215e31 (diff)
downloadllvm-3ebb33632a1509450fdbc1fb6a21107a0a513072.zip
llvm-3ebb33632a1509450fdbc1fb6a21107a0a513072.tar.gz
llvm-3ebb33632a1509450fdbc1fb6a21107a0a513072.tar.bz2
[lldb] Complete OptionValue cleanup (NFC)
Make the `Get.*Value` and `Set.*Value` function private and migrate the last remaining call sites to the new overloaded/templated functions.
Diffstat (limited to 'lldb/source/Commands/CommandObjectMemory.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectMemory.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lldb/source/Commands/CommandObjectMemory.cpp b/lldb/source/Commands/CommandObjectMemory.cpp
index a8896f8..ba5aad3 100644
--- a/lldb/source/Commands/CommandObjectMemory.cpp
+++ b/lldb/source/Commands/CommandObjectMemory.cpp
@@ -1048,7 +1048,7 @@ protected:
if (m_memory_options.m_string.OptionWasSet()) {
llvm::StringRef str =
- m_memory_options.m_string.GetStringValue().value_or("");
+ m_memory_options.m_string.GetValueAs<llvm::StringRef>().value_or("");
if (str.empty()) {
result.AppendError("search string must have non-zero length.");
return false;
@@ -1059,8 +1059,9 @@ protected:
ValueObjectSP result_sp;
if ((eExpressionCompleted ==
process->GetTarget().EvaluateExpression(
- m_memory_options.m_expr.GetStringValue().value_or(""), frame,
- result_sp)) &&
+ m_memory_options.m_expr.GetValueAs<llvm::StringRef>().value_or(
+ ""),
+ frame, result_sp)) &&
result_sp) {
uint64_t value = result_sp->GetValueAsUnsigned(0);
std::optional<uint64_t> size =