[lldb/Scripts]
authorPavel Labath <pavel@labath.sk>
Tue, 30 Jun 2020 15:05:08 +0000 (17:05 +0200)
committerPavel Labath <pavel@labath.sk>
Tue, 30 Jun 2020 15:06:14 +0000 (17:06 +0200)
Fix analyze-project-deps.py. "lldb/Plugins" (home of Plugins.def) does
not depend on anything. Make sure this does not crash the script.

lldb/scripts/analyze-project-deps.py

index c6e3263..a120260 100755 (executable)
@@ -109,7 +109,7 @@ def expand(path_queue, path_lengths, cycles, src_map):
         next_len = path_lengths.pop(0) + 1
         last_component = cur_path[-1]
 
-        for item in src_map[last_component]:
+        for item in src_map.get(last_component, []):
             if item.startswith("clang"):
                 continue