[Lldb-commits] [PATCH] D116901: [lldb] Guard libstdc++ specific 'frame var' test

Dave Lee via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sun Jan 9 15:05:40 PST 2022


kastiglione created this revision.
kastiglione added reviewers: aprantl, JDevlieghere.
kastiglione requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

While working on D116788 <https://reviews.llvm.org/D116788> (properly error out of `frame var`), this libstdc++
specific `frame var` invocation was found in the tests. This test is in the
generic directory, but has this one case that requires libstdc++. The fix here
is to put the one `expect()` inside of a condition that checks for libstdc++.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D116901

Files:
  lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/list/TestDataFormatterGenericList.py


Index: lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/list/TestDataFormatterGenericList.py
===================================================================
--- lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/list/TestDataFormatterGenericList.py
+++ lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/list/TestDataFormatterGenericList.py
@@ -62,12 +62,14 @@
         self.expect("frame variable numbers_list --raw", matching=False,
                     substrs=['size=0',
                              '{}'])
-        self.expect(
-            "frame variable &numbers_list._M_impl._M_node --raw",
-            matching=False,
-            substrs=[
-                'size=0',
-                '{}'])
+
+        if stdlib_type == USE_LIBSTDCPP:
+            self.expect(
+                "frame variable &numbers_list._M_impl._M_node --raw",
+                matching=False,
+                substrs=[
+                    'size=0',
+                    '{}'])
 
         self.expect("frame variable numbers_list",
                     substrs=['size=0',


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116901.398462.patch
Type: text/x-patch
Size: 1127 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220109/02ef2806/attachment.bin>


More information about the lldb-commits mailing list