diff options
author | Adrian Prantl <aprantl@apple.com> | 2019-01-15 22:30:01 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2019-01-15 22:30:01 +0000 |
commit | 326ef9a6ea2dccdb5ea5559b85560b4a20f9daa5 (patch) | |
tree | 62d094eeb09fe3e092901791b795596216af3e1a /lldb/source/Plugins/ExpressionParser/Clang | |
parent | ba99eb0841cbb57e2c246705e69b646ac0f1f8d9 (diff) |
Simplify code by using Optional::getValueOr()
Diffstat (limited to 'lldb/source/Plugins/ExpressionParser/Clang')
-rw-r--r-- | lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp b/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp index d66ee83e0fe..3a7cd58b70a 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp @@ -337,9 +337,7 @@ bool IRForTarget::CreateResultVariable(llvm::Function &llvm_function) { if (log) log->Printf("Creating a new result global: \"%s\" with size 0x%" PRIx64, m_result_name.GetCString(), - m_result_type.GetByteSize(nullptr) - ? *m_result_type.GetByteSize(nullptr) - : 0); + m_result_type.GetByteSize(nullptr).getValueOr(0)); // Construct a new result global and set up its metadata |