summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectMemory.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2019-01-15 20:33:58 +0000
committerAdrian Prantl <aprantl@apple.com>2019-01-15 20:33:58 +0000
commitd6a9bbf68e2c795d0d2d7f831235ed14af978f87 (patch)
tree87a0eb5e4ce3d616030c83aa16c8bc6faf085791 /lldb/source/Commands/CommandObjectMemory.cpp
parent3cdd1a7d47f3a51c67979d28ce542a2f03c12d0c (diff)
downloadbcm5719-llvm-d6a9bbf68e2c795d0d2d7f831235ed14af978f87.tar.gz
bcm5719-llvm-d6a9bbf68e2c795d0d2d7f831235ed14af978f87.zip
Replace auto -> llvm::Optional<uint64_t>
This addresses post-commit feedback for https://reviews.llvm.org/D56688 llvm-svn: 351237
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 32ffd5a1dcf..b1edb1afa5d 100644
--- a/lldb/source/Commands/CommandObjectMemory.cpp
+++ b/lldb/source/Commands/CommandObjectMemory.cpp
@@ -519,7 +519,7 @@ protected:
--pointer_count;
}
- auto size = clang_ast_type.GetByteSize(nullptr);
+ llvm::Optional<uint64_t> size = clang_ast_type.GetByteSize(nullptr);
if (!size) {
result.AppendErrorWithFormat(
"unable to get the byte size of the type '%s'\n",
@@ -642,7 +642,7 @@ protected:
if (!m_format_options.GetFormatValue().OptionWasSet())
m_format_options.GetFormatValue().SetCurrentValue(eFormatDefault);
- auto size = clang_ast_type.GetByteSize(nullptr);
+ llvm::Optional<uint64_t> size = clang_ast_type.GetByteSize(nullptr);
if (!size) {
result.AppendError("can't get size of type");
return false;
@@ -1064,7 +1064,8 @@ protected:
m_memory_options.m_expr.GetStringValue(), frame, result_sp)) &&
result_sp) {
uint64_t value = result_sp->GetValueAsUnsigned(0);
- auto size = result_sp->GetCompilerType().GetByteSize(nullptr);
+ llvm::Optional<uint64_t> size =
+ result_sp->GetCompilerType().GetByteSize(nullptr);
if (!size)
return false;
switch (*size) {
OpenPOWER on IntegriCloud