[Lldb-commits] [PATCH] D16703: Fix TestDataFormatterScript for Linux.

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


chaoren created this revision.
chaoren added a reviewer: granata.enrico.
chaoren added a subscriber: lldb-commits.

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

http://reviews.llvm.org/D16703

Files:
  source/DataFormatters/TypeSummary.cpp

Index: source/DataFormatters/TypeSummary.cpp
===================================================================
--- source/DataFormatters/TypeSummary.cpp
+++ source/DataFormatters/TypeSummary.cpp
@@ -263,21 +263,20 @@
                  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();
-    
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16703.46330.patch
Type: text/x-patch
Size: 956 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160129/754bd92d/attachment.bin>


More information about the lldb-commits mailing list