aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2012-06-08 01:50:49 +0000
committerAnna Zaks <ganna@apple.com>2012-06-08 01:50:49 +0000
commit19b17cb57ab809e5e3f02ac0beb85003350d560a (patch)
treee8418d68ccb206a861a2500dc6084f50eee797e6
parentf4fe843aac730e2202b3c9c6c52649ee186ba788 (diff)
[analyzer] Use "issue hash" in CmpRuns; followup on r158180
(For the future: It would be more efficient to produce a hash key with the embedded function info inside the compiler.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158187 91177308-0d34-0410-b5e6-96231b3b80d8
-rwxr-xr-xutils/analyzer/CmpRuns.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/utils/analyzer/CmpRuns.py b/utils/analyzer/CmpRuns.py
index e68c45df18..220045319f 100755
--- a/utils/analyzer/CmpRuns.py
+++ b/utils/analyzer/CmpRuns.py
@@ -134,6 +134,14 @@ def loadResults(path, opts, deleteEmpty=True):
return run
+def getIssueIdentifier(d) :
+ id = ''
+ if 'issue_context' in d.data :
+ id += d.data['issue_context']
+ if 'issue_hash' in d.data :
+ id += str(d.data['issue_hash'])
+ return id
+
def compareResults(A, B):
"""
compareResults - Generate a relation from diagnostics in run A to
@@ -152,12 +160,12 @@ def compareResults(A, B):
neqB = []
eltsA = list(A.diagnostics)
eltsB = list(B.diagnostics)
- eltsA.sort(key = lambda d: d.data)
- eltsB.sort(key = lambda d: d.data)
+ eltsA.sort(key = getIssueIdentifier)
+ eltsB.sort(key = getIssueIdentifier)
while eltsA and eltsB:
a = eltsA.pop()
b = eltsB.pop()
- if a.data['location'] == b.data['location']:
+ if (getIssueIdentifier(a) == getIssueIdentifier(b)) :
res.append((a, b, 0))
elif a.data > b.data:
neqA.append(a)