diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-01-18 10:40:29 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-01-18 10:40:29 -0800 |
commit | dd68fbf78cf34aacb54c284b474399ef94373045 (patch) | |
tree | 90577f8ba0c24144e147f2a1cbc9df1657f51c54 /tools | |
parent | 67040a3b6e211f195fccefa06610dd730c21b42e (diff) |
further refactor the library scanning code, and prepare for libcxx
Diffstat (limited to 'tools')
-rw-r--r-- | tools/shared.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/shared.py b/tools/shared.py index 4fb02987..c869d4f5 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -487,15 +487,17 @@ 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[symbol] = True + ret.undefs.append(symbol) else: - ret.defs[symbol] = True + ret.defs.append(symbol) + ret.defs = set(ret.defs) + ret.undefs = set(ret.undefs) return ret @staticmethod |