[Lldb-commits] [lldb] r138159 - /lldb/trunk/utils/test/run-dis.py

Johnny Chen johnny.chen at apple.com
Fri Aug 19 17:12:13 PDT 2011


Author: johnny
Date: Fri Aug 19 19:12:13 2011
New Revision: 138159

URL: http://llvm.org/viewvc/llvm-project?rev=138159&view=rev
Log:
No need to look further if the file is a symbolic link.  Look for the real file.
Plus add some comments.

Modified:
    lldb/trunk/utils/test/run-dis.py

Modified: lldb/trunk/utils/test/run-dis.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/utils/test/run-dis.py?rev=138159&r1=138158&r2=138159&view=diff
==============================================================================
--- lldb/trunk/utils/test/run-dis.py (original)
+++ lldb/trunk/utils/test/run-dis.py Fri Aug 19 19:12:13 2011
@@ -45,14 +45,22 @@
     old_dir = os.getcwd()
     for name in names:
         path = os.path.join(dir, name)
+        # No need to look further if path is a directory.
         if os.path.isdir(path):
             continue
+        # Is a symbolic link.
+        if os.path.islink(path):
+            continue
+        # Or a .h file.
         if name.endswith(".h"):
             continue
 
+        # We'll be pattern matching based on the path relative to the SDK root.
         replaced_path = path.replace(root_dir, "", 1)
+        # Check regular expression match for the replaced path.
         if not path_regexp.search(replaced_path):
             continue
+        # If a suffix is specified, check it, too.
         if suffix and not name.endswith(suffix):
             continue
         if not isbinary(path):





More information about the lldb-commits mailing list