From: Adam Nemet Date: Mon, 14 Nov 2016 18:38:48 +0000 (+0000) Subject: [opt-viewer] Don't fail with remarks without debug location X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f9632454797b43a6c53922de2236af5fab85eef7;p=llvm [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 --- diff --git a/utils/opt-viewer/opt-viewer.py b/utils/opt-viewer/opt-viewer.py index ee5c7b52e11..bc30618c854 100755 --- a/utils/opt-viewer/opt-viewer.py +++ b/utils/opt-viewer/opt-viewer.py @@ -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