[Lldb-commits] [lldb] r241795 - Fix TestStopHookMultipleThreads and TestNamespace after r241751
Pavel Labath
labath at google.com
Thu Jul 9 03:57:54 PDT 2015
Author: labath
Date: Thu Jul 9 05:57:54 2015
New Revision: 241795
URL: http://llvm.org/viewvc/llvm-project?rev=241795&view=rev
Log:
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.
Modified:
lldb/trunk/source/Symbol/Variable.cpp
Modified: lldb/trunk/source/Symbol/Variable.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Variable.cpp?rev=241795&r1=241794&r2=241795&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Variable.cpp (original)
+++ lldb/trunk/source/Symbol/Variable.cpp Thu Jul 9 05:57:54 2015
@@ -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;
}
More information about the lldb-commits
mailing list