aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Miguel Alcon Pinto <malcon@google.com>2015-09-16 18:37:45 +0000
committerGravatar Florian Weikert <fwe@google.com>2015-09-16 20:05:54 +0000
commit933c13ac4602aa5e40c41d91f5d7deda48710684 (patch)
tree5143d6585c6b97c24aa3561329771d7618ad531f /tools
parent54b6920c3ffafd3a837a319de959c181a4320c7c (diff)
Remove comment
Also includes the following changes: Fix a bug in which the dead code pruner throws if users specify J2ObjC proto classes as entry classes. -- Make skyquery more optimal. -- MOS_MIGRATED_REVID=103213483
Diffstat (limited to 'tools')
-rwxr-xr-xtools/objc/j2objc_dead_code_pruner.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/objc/j2objc_dead_code_pruner.py b/tools/objc/j2objc_dead_code_pruner.py
index 2245778957..ec1ed8575d 100755
--- a/tools/objc/j2objc_dead_code_pruner.py
+++ b/tools/objc/j2objc_dead_code_pruner.py
@@ -105,7 +105,12 @@ def BuildReachableFileSet(entry_classes, reachability_tree, header_mapping):
'j2objc_library rules.')
transpiled_file_name = header_mapping[entry_class]
reachable_files.add(transpiled_file_name)
- current_level_deps = reachability_tree[transpiled_file_name]
+ current_level_deps = []
+ # We need to check if the transpiled file is in the reachability tree
+ # because J2ObjC protos are not analyzed for dead code stripping and
+ # therefore are not in the reachability tree at all.
+ if transpiled_file_name in reachability_tree:
+ current_level_deps = reachability_tree[transpiled_file_name]
while current_level_deps:
next_level_deps = []
for dep in current_level_deps: