Skip to content

Commit 39df02f

Browse files
committed
BugFix: don't randomly drop DILoc bugs for a file
1 parent f23826d commit 39df02f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

llvm/utils/llvm-original-di-preservation.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -462,9 +462,9 @@ def Main():
462462
di_file_args = OrderedDict()
463463

464464
# Use the defaultdict in order to make multidim dicts.
465-
di_location_bugs = defaultdict(lambda: defaultdict(dict))
466-
di_subprogram_bugs = defaultdict(lambda: defaultdict(dict))
467-
di_variable_bugs = defaultdict(lambda: defaultdict(dict))
465+
di_location_bugs = defaultdict(lambda: defaultdict(list))
466+
di_subprogram_bugs = defaultdict(lambda: defaultdict(list))
467+
di_variable_bugs = defaultdict(lambda: defaultdict(list))
468468

469469
# Use the ordered dict to make a summary.
470470
di_location_bugs_summary = OrderedDict()
@@ -509,9 +509,9 @@ def Main():
509509
skipped_lines += 1
510510
continue
511511

512-
di_loc_bugs = []
513-
di_sp_bugs = []
514-
di_var_bugs = []
512+
di_loc_bugs = di_location_bugs[bugs_file][bugs_pass]
513+
di_sp_bugs = di_subprogram_bugs[bugs_file][bugs_pass]
514+
di_var_bugs = di_variable_bugs[bugs_file][bugs_pass]
515515

516516
# Omit duplicated bugs.
517517
di_loc_set = set()

0 commit comments

Comments
 (0)