The SBValue.linked_list_iter() API failed for an empty list.
Fix the bug and add a test case.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136265 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/scripts/Python/modify-python-lldb.py b/scripts/Python/modify-python-lldb.py
index 3cd3126..9f5f8c9 100644
--- a/scripts/Python/modify-python-lldb.py
+++ b/scripts/Python/modify-python-lldb.py
@@ -129,12 +129,10 @@
         """
         try:
             item = self.GetChildMemberWithName(next_item_name)
-            while item:
+            while not end_of_list_test(item):
                 yield item
                 # Prepare for the next iteration.
                 item = item.GetChildMemberWithName(next_item_name)
-                if end_of_list_test(item):
-                    break
         except:
             # Exception occurred.  Stop the generator.
             pass