[Lldb-commits] [lldb] ac7c880 - [lldb][gmodules] Fix TestDataFormatterCpp with gmodules on macOS

Raphael Isemann via lldb-commits lldb-commits at lists.llvm.org
Mon Nov 1 10:44:46 PDT 2021


Author: Raphael Isemann
Date: 2021-11-01T18:44:32+01:00
New Revision: ac7c8808ba89fb6188d5b1bb83bdd08e5c39d71e

URL: https://github.com/llvm/llvm-project/commit/ac7c8808ba89fb6188d5b1bb83bdd08e5c39d71e
DIFF: https://github.com/llvm/llvm-project/commit/ac7c8808ba89fb6188d5b1bb83bdd08e5c39d71e.diff

LOG: [lldb][gmodules] Fix TestDataFormatterCpp with gmodules on macOS

'Point' is actually a system type defined on macOS.

Added: 
    

Modified: 
    lldb/test/API/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
    lldb/test/API/functionalities/data-formatter/data-formatter-cpp/main.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/test/API/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py b/lldb/test/API/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
index bc681825d4a3b..e6b1d43599989 100644
--- a/lldb/test/API/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
+++ b/lldb/test/API/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
@@ -120,32 +120,32 @@ def cleanup():
                 ' = ptr = ',
                 ' "1234567890123456789012345678901234567890123456789012345678901234ABC"'])
 
-        self.runCmd("type summary add -c Point")
+        self.runCmd("type summary add -c TestPoint")
 
         self.expect("frame variable iAmSomewhere",
                     substrs=['x = 4',
                              'y = 6'])
 
         self.expect("type summary list",
-                    substrs=['Point',
+                    substrs=['TestPoint',
                              'one-line'])
 
-        self.runCmd("type summary add --summary-string \"y=${var.y%x}\" Point")
+        self.runCmd("type summary add --summary-string \"y=${var.y%x}\" TestPoint")
 
         self.expect("frame variable iAmSomewhere",
                     substrs=['y=0x'])
 
         self.runCmd(
-            "type summary add --summary-string \"y=${var.y},x=${var.x}\" Point")
+            "type summary add --summary-string \"y=${var.y},x=${var.x}\" TestPoint")
 
         self.expect("frame variable iAmSomewhere",
                     substrs=['y=6',
                              'x=4'])
 
-        self.runCmd("type summary add --summary-string \"hello\" Point -e")
+        self.runCmd("type summary add --summary-string \"hello\" TestPoint -e")
 
         self.expect("type summary list",
-                    substrs=['Point',
+                    substrs=['TestPoint',
                              'show children'])
 
         self.expect("frame variable iAmSomewhere",

diff  --git a/lldb/test/API/functionalities/data-formatter/data-formatter-cpp/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-cpp/main.cpp
index b22a3d8c732ad..c81a68fd2094a 100644
--- a/lldb/test/API/functionalities/data-formatter/data-formatter-cpp/main.cpp
+++ b/lldb/test/API/functionalities/data-formatter/data-formatter-cpp/main.cpp
@@ -22,10 +22,10 @@ typedef Type3 Type4; // should show as char
 typedef int ChildType; // should show as int
 typedef int AnotherChildType; // should show as int
 
-struct Point {
+struct TestPoint {
     int x;
     int y;
-    Point(int X = 3, int Y = 2) : x(X), y(Y) {}
+    TestPoint(int X = 3, int Y = 2) : x(X), y(Y) {}
 };
 
 typedef float ShowMyGuts;
@@ -85,7 +85,7 @@ int main (int argc, const char * argv[])
     
     Speed* SPPtrILookHex = new Speed(16);
     
-    Point iAmSomewhere(4,6);
+    TestPoint iAmSomewhere(4,6);
     
 	i_am_cool *cool_pointer = (i_am_cool*)malloc(sizeof(i_am_cool)*3);
 	cool_pointer[0] = i_am_cool(3,-3.141592,'E');


        


More information about the lldb-commits mailing list