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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286861 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Adam Nemet 2016-11-14 18:38:48 +00:00
parent af76145600
commit f963245479

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