First part of a fix to make GetNonSyntheticValue() work correctly
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156397 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBValue.cpp b/source/API/SBValue.cpp
index 6908c8f..a94b18b 100644
--- a/source/API/SBValue.cpp
+++ b/source/API/SBValue.cpp
@@ -1014,8 +1014,8 @@
// deliberately breaking the rules here to optimize the case where we DO NOT want
// the synthetic value to be returned to the user - if we did not do this, we would have to tell
// the target to suppress the synthetic value, and then return the flag to its original value
- if (value_sp->GetParent())
- sb_value.m_opaque_sp = value_sp->GetParent()->GetSP();
+ if (value_sp->GetNonSyntheticValue())
+ sb_value.m_opaque_sp = value_sp->GetNonSyntheticValue();
}
}
}