[Lldb-commits] [lldb] r259153 - Fix TestDataFormatterScript for Linux.

Chaoren Lin via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 28 19:48:08 PST 2016


Author: chaoren
Date: Thu Jan 28 21:48:08 2016
New Revision: 259153

URL: http://llvm.org/viewvc/llvm-project?rev=259153&view=rev
Log:
Fix TestDataFormatterScript for Linux.

Summary:
m_function_name will contain a dummy name for the auto-generated function from
the python script on Linux. Check for script name first.

Reviewers: granata.enrico

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D16703

Modified:
    lldb/trunk/source/DataFormatters/TypeSummary.cpp

Modified: lldb/trunk/source/DataFormatters/TypeSummary.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/TypeSummary.cpp?rev=259153&r1=259152&r2=259153&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/TypeSummary.cpp (original)
+++ lldb/trunk/source/DataFormatters/TypeSummary.cpp Thu Jan 28 21:48:08 2016
@@ -263,21 +263,20 @@ ScriptSummaryFormat::GetDescription ()
                  SkipsPointers() ? " (skip pointers)" : "",
                  SkipsReferences() ? " (skip references)" : "",
                  HideNames(nullptr) ? " (hide member names)" : "");
-    if (m_function_name.empty())
+    if (m_python_script.empty())
     {
-        if (m_python_script.empty())
+        if (m_function_name.empty())
         {
             sstr.PutCString("no backing script");
         }
         else
         {
-            sstr.PutCString(m_python_script.c_str());
+            sstr.PutCString(m_function_name.c_str());
         }
     }
     else
     {
-        sstr.PutCString(m_function_name.c_str());
+        sstr.PutCString(m_python_script.c_str());
     }
     return sstr.GetString();
-    
 }




More information about the lldb-commits mailing list