summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2015-07-09 10:57:54 +0000
committerPavel Labath <labath@google.com>2015-07-09 10:57:54 +0000
commitffffda3e28e932241b1ed9c67811b3921d2c9716 (patch)
tree582aa67139753a46c65c2a53a892c64961b05921
parent81b79dd2e59586f6839fc916e838ee25b5d6a2a3 (diff)
Fix TestStopHookMultipleThreads and TestNamespace after r241751
The mentioned commit introduced a subtle change in behavior when printing variable names. This occured when we have a variable, for which we only know the demangled name, because the compiler has failed to provide one (this typically happens for variables in anonymous namespaces). A Mangled class which contains only a demangled name considers itself to be invalid (this could possibly be a bug), but it's GetName() method still returns a valid demangled name. The previous commit introduced the check for the validity of the class, and if it failed, it would fall back to printing the bare name (without the namespace prefixes, as the tests were expecting). I revert this part of the commit and check the validity of the string returned by GetName() instead. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@241795 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--source/Symbol/Variable.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/source/Symbol/Variable.cpp b/source/Symbol/Variable.cpp
index 5e7827737..2490e98ac 100644
--- a/source/Symbol/Variable.cpp
+++ b/source/Symbol/Variable.cpp
@@ -81,12 +81,9 @@ Variable::GetLanguage () const
ConstString
Variable::GetName() const
{
- if (m_mangled)
- {
- ConstString name = m_mangled.GetName(GetLanguage());
- if (name)
- return name;
- }
+ ConstString name = m_mangled.GetName(GetLanguage());
+ if (name)
+ return name;
return m_name;
}