aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-01-18 09:53:48 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-01-18 09:53:48 -0800
commit67040a3b6e211f195fccefa06610dd730c21b42e (patch)
tree9c3c27b6f51ffd53f6f48b599624066c9c86c453 /tools
parent2a9a546698a027605ea1f487d6d2b942ad347b9b (diff)
refactor library def scanning code
Diffstat (limited to 'tools')
-rw-r--r--tools/shared.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/shared.py b/tools/shared.py
index 0f117fad..4fb02987 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -487,15 +487,15 @@ class Building:
# LLVM binary ==> list of symbols
output = Popen([LLVM_NM, filename], stdout=stdout, stderr=stderr).communicate()[0]
class ret:
- defs = []
- undefs = []
+ defs = {}
+ undefs = {}
for line in output.split('\n'):
if len(line) == 0: continue
status, symbol = filter(lambda seg: len(seg) > 0, line.split(' '))
if status == 'U':
- ret.undefs.append(symbol)
+ ret.undefs[symbol] = True
else:
- ret.defs.append(symbol)
+ ret.defs[symbol] = True
return ret
@staticmethod