Workaround Python's map difference between Python2/3
authorSerge Guelton <sguelton@redhat.com>
Thu, 21 Mar 2019 14:44:58 +0000 (14:44 +0000)
committerSerge Guelton <sguelton@redhat.com>
Thu, 21 Mar 2019 14:44:58 +0000 (14:44 +0000)
When the output of map is not used, using a list comprehension or an explicit
call to list looks awkward.

Differential Revision: https://reviews.llvm.org/D59587

llvm-svn: 356672

lldb/scripts/Xcode/build-llvm.py

index 4d868de6b1099a760733e04bb8bb088f7c7a1135..0a9264f3c4afb5e181b2e820909397629209a8ca 100755 (executable)
@@ -239,7 +239,8 @@ def check_out_if_needed(spec):
 
 
 def all_check_out_if_needed():
-    map(check_out_if_needed, XCODE_REPOSITORIES())
+    for r in XCODE_REPOSITORIES():
+        check_out_if_needed(r)
 
 
 def should_build_llvm():
@@ -263,7 +264,8 @@ def setup_source_symlink(repo):
 
 
 def setup_source_symlinks():
-    map(setup_source_symlink, XCODE_REPOSITORIES())
+    for r in XCODE_REPOSITORIES():
+        setup_source_symlink(r)
 
 
 def setup_build_symlink():