summaryrefslogtreecommitdiffstats
path: root/lldb/source/API
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2015-10-30 21:43:15 +0000
committerJim Ingham <jingham@apple.com>2015-10-30 21:43:15 +0000
commitd612918367abe0e9d1dd1d37b33d270d6e5cb24f (patch)
tree832d67e752773302726a6c8e44ba5132381c62f7 /lldb/source/API
parent8731ad72aab699ee5736aeef00f099fc70b8f7f4 (diff)
downloadbcm5719-llvm-d612918367abe0e9d1dd1d37b33d270d6e5cb24f.tar.gz
bcm5719-llvm-d612918367abe0e9d1dd1d37b33d270d6e5cb24f.zip
Make the error return more explicit when an SBValue has no value.
llvm-svn: 251722
Diffstat (limited to 'lldb/source/API')
-rw-r--r--lldb/source/API/SBValue.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lldb/source/API/SBValue.cpp b/lldb/source/API/SBValue.cpp
index 6a558800db7..a8584c5d38c 100644
--- a/lldb/source/API/SBValue.cpp
+++ b/lldb/source/API/SBValue.cpp
@@ -1425,7 +1425,10 @@ lldb::ValueObjectSP
SBValue::GetSP (ValueLocker &locker) const
{
if (!m_opaque_sp || !m_opaque_sp->IsValid())
+ {
+ locker.GetError().SetErrorString("No value");
return ValueObjectSP();
+ }
return locker.GetLockedSP(*m_opaque_sp.get());
}
OpenPOWER on IntegriCloud