[opt-viewer] Don't fail with remarks without debug location

llvm-svn: 286861
This commit is contained in:
Adam Nemet 2016-11-14 18:38:48 +00:00
parent 8236fe103f
commit 544220fc0b
1 changed files with 2 additions and 2 deletions

View File

@ -275,8 +275,8 @@ for input_file in args.yaml_files:
f = open(input_file)
docs = yaml.load_all(f)
for remark in docs:
# Avoid duplicated remarks
if remark.key in all_remarks:
# Avoid remarks withoug debug location or if they are duplicated
if not hasattr(remark, 'DebugLoc') or remark.key in all_remarks:
continue
all_remarks[remark.key] = remark